|
|
#1 |
|
Senior Member
Join Date: Sep 2006
Location: USA
Posts: 116
Rep Power: 14 ![]() |
I have setup an extra field named "Item Location". I want to show that in the plugin function.new_listing.php.
I can show the city they listed when they signed up with the code below, but I want to show the city where the item is physically located by using the Extra field "Item Location". How do I replace [city] with the extra field in the code below? Thanks! PHP Code:
PHP Code:
__________________
V3.1.5 Designer "I have not failed. I've just found 10,000 ways that won't work." THOMAS ALVA EDISON |
|
|
|
|
|
#2 |
|
Coder
Join Date: Mar 2006
Posts: 4,567
Rep Power: 111 ![]() ![]() |
Extra fields are a whole different can of worms. Since extra fields can apply to only certain categories they are actually housed in 3 different tables.
class_fields class_fields_bindings class_fields_options Your going to have to create a whole new query, joining some of the above tables to get the value of the extra field you need so you can place it in the plugin. Your best bet would be to look at the code that pulls up the extra fields and the field contents for viewlisting. |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Sep 2006
Location: USA
Posts: 116
Rep Power: 14 ![]() |
The code below is what pulls the extra fields in viewlisting.php. I'm not good at php but the code seems to output ALL the extra fields. How can I modify it to only pull one specific field: "Item Location"?
I really appreciate the help! PHP Code:
__________________
V3.1.5 Designer "I have not failed. I've just found 10,000 ways that won't work." THOMAS ALVA EDISON |
|
|
|
|
|
#4 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,125
Rep Power: 118 ![]() |
No that is actually just looping through the array that the php file generated. In v3.1.x I think you need to look at viewlisting.php and find the //extra fields section.
__________________
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 | 68 @ Twitter | My Modules |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Sep 2006
Location: USA
Posts: 116
Rep Power: 14 ![]() |
Is it possible to get the extra field I want from the code in my last post by maybe using the extra field ID# or some other way? I only have the designer edition and I can't view the viewlisting.php file.
__________________
V3.1.5 Designer "I have not failed. I've just found 10,000 ways that won't work." THOMAS ALVA EDISON |
|
|
|
|
|
#6 |
|
Coder
Join Date: Mar 2006
Posts: 4,567
Rep Power: 111 ![]() ![]() |
The code in the plugin you listed doesnt even query the extra field tables so the extra field data isnt even pulled from the database.
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sort order by extra field | HotAir | v3.1 Modules & Modifications | 3 | 02-11-2008 11:03 AM |
| admin > category > extra fields info disappearing | kgrinsteiner | v3.1 Questions & Support | 0 | 12-16-2007 07:27 PM |
| Extra Search Field | Greg H | v3.1 Modules & Modifications | 2 | 10-04-2007 12:04 AM |
| Adding extra field to search.php... | abkeller | v3.1 Modules & Modifications | 4 | 06-05-2007 12:15 AM |
| listing extra field value when it is an array? | Mike-N-Tosh | v3.1 Modules & Modifications | 13 | 04-21-2007 09:31 AM |