![]() |
MODIFICATION: Display your extra fields on the showlistings.tpl page
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} |
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.
|
which version was it added in? And I'll change my post
|
Sorry forgot to mention that. Starting with v4.0.1 that function is now added.
|
Quote:
|
error on listings.php
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? |
Quote:
|
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. |
Quote:
Thanks for the heads up. I fixed the post. |
Thanks! It works now!:)
|
| All times are GMT -4. The time now is 05:46 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0