This is a discussion on MODIFICATION: Display your extra fields on the showlistings.tpl page within the v4 Modules / Modifications forums, part of the Help & Support category; You must have the developer edition in order to do this modification. Put this code somewhere in your includes/classes/kernal/listings.php page. ...
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
You must have the developer edition in order to do this modification.
Put this code somewhere in your includes/classes/kernal/listings.php page. I added it to the very end. If you have version 4.0 start here. If you have version 4.01, please skip this step and continue with the next one. PHP Code:
Find this: PHP Code:
PHP Code:
Replace the number 4 with your field id which you can get in administration, under extra fields.To add another extra field just it. On Showlistings.tpl add this right where you want it to show up: Code:
{$entry.extrafield}
Code:
{$entry.extrafield2}
__________________
Version 4.0.3 Developer Last edited by cwp; 04-22-2008 at 01:14 PM. |
|
#2
|
||||
|
||||
|
I wanted to follow up on this thread and say that first function is now part of the file. So it will be already included.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#3
|
||||
|
||||
|
which version was it added in? And I'll change my post
__________________
Version 4.0.3 Developer |
|
#4
|
||||
|
||||
|
Sorry forgot to mention that. Starting with v4.0.1 that function is now added.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#5
|
||||
|
||||
|
Thanks, I edited the original post with steps for each version.
__________________
Version 4.0.3 Developer |
|
#6
|
|||
|
|||
|
I inserted $row['extrafield'] = getExtraField($row['id'], 4); replacing the "4" with the id number on the listings.php page and when I do a search on the site, the view listings page is blank with this error showing up.
Fatal error: Call to undefined function: getextrafield() in the listings.php page. Any suggestions on how to fix? |
|
#7
|
||||
|
||||
|
Quote:
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#8
|
||||
|
||||
|
It does appear to have an error in the instructions. I have just modified them to be correct. Basically where you have:
$row['extrafield'] = getExtraField($row['id'], 4); Should be: $row['extrafield'] = $this->getExtraField($row['id'], 4); Also keep in mind the number 4 needs to come from the administration extra fields. This is the id of the extra field you want to get.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#9
|
||||
|
||||
|
Quote:
Thanks for the heads up. I fixed the post.
__________________
Version 4.0.3 Developer |
|
#10
|
|||
|
|||
|
Thanks! It works now!
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MODIFICATION: Display extra fields separately. | cwp | v4 Modules / Modifications | 2 | 05-30-2008 03:20 PM |
| Display extra fields on showlistings.tpl | cwp | v4 Questions & Support | 9 | 03-03-2008 09:52 AM |
| Display extra fields by themselves? | cwp | v4 Questions & Support | 3 | 02-22-2008 04:34 AM |
| Extra fields to be searchable on the first search page, before a category is chosen | Greg H | v3.1 Modules & Modifications | 5 | 11-28-2007 03:29 PM |
| extra fields in the listing modification | Acpjax | v3.1 Questions & Support | 4 | 11-20-2006 02:20 PM |