Support Forums

Listing Number to take person directly to a listing?

This is a discussion on Listing Number to take person directly to a listing? within the Technical Support forums, part of the Technical Support Forums category; Is there a way for me to add a listing number to each ad so if someone wanted to, they ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 09-25-2008, 01:50 PM   #1
Junior Member
 
Join Date: Aug 2008
Posts: 24
Rep Power: 10
domino is on a distinguished road
Question Listing Number to take person directly to a listing?

Is there a way for me to add a listing number to each ad so if someone wanted to, they could use this reference number to take someone directly to their listing?

I'm thinking about uses for this for, say, garage sales, where people could put the site address with an ad number so that people who want more info know they can go to the site and pull up that listing.

Does that make sense? I know I can create custom fields. I know I could create a listing number and people could search for that number to find the listing. What I'm thinking about is actually having a page address for that number.

Don't know if there is a way or an easy way to do this.

Thanks!
domino is offline  
Old 09-25-2008, 02:04 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,497
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

You could use the listing id which is unique to each listing in the database.

Then just add a search form:
Code:
<form method = "get"  action = "searchresults.php" >                  
<input type = "text"  name = "adid"  />                  
<input type = "submit"  name = "Submit"  value = "Go"  />                  
</form>
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-25-2008, 03:05 PM   #3
Junior Member
 
Join Date: Aug 2008
Posts: 24
Rep Power: 10
domino is on a distinguished road
Default

That's great Eric.

Should I display that listing id in the classifieds section? It doesn't display by default that I can tell, although it's obviously in the database.

I'm thinking ahead to make things easy for users to find the id as well as me.
domino is offline  
Old 09-25-2008, 03:15 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,497
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Yes you would want to do that otherwise they wouldn't know the id.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-25-2008, 03:49 PM   #5
Junior Member
 
Join Date: Aug 2008
Posts: 24
Rep Power: 10
domino is on a distinguished road
Default

Well, yes that's obvious isn't it! ha

Eric, I can't find anywhere where I can change settings to display this id. Do I need to edit a template?
domino is offline  
Old 09-25-2008, 03:55 PM   #6
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,497
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Yep I would edit the templates. Probably viewlisting.tpl and add:
{$view} wherever you want it to display.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-25-2008, 05:17 PM   #7
Junior Member
 
Join Date: Aug 2008
Posts: 24
Rep Power: 10
domino is on a distinguished road
Default

Thank you Eric

To help others, here is the complete snippet of code that you need to add. I chose to put mine after the description to keep it out of the way but yet identify the ad.

1. Open viewlisting.tpl

2. Decide where you want ID to display and insert the following code:

<tr>
<td><strong>{$smarty.const.LANG_ID}:</strong></td>
<td>{$view}</td>
</tr>


domino is offline  
Old 09-25-2008, 05:46 PM   #8
Junior Member
 
Join Date: Aug 2008
Posts: 24
Rep Power: 10
domino is on a distinguished road
Default

As for the new search section so they can search by id, I added a new div called idsearch and inserted this code in the layout.tpl:

<form method = "get" action = "searchresults.php" >
<input type = "text" name = "id" class="search" value ="{$smarty.get.id}" />
<input type = "submit" name = "Submit" value = "Go" />
</form>


Now, that search works in that it gives results, but the results are all listings. It finds every listing. It's not looking at just the id.

Do I need to have the id display on the category listing section or do I need to correct my code somehow?

Even adding this search isn't exactly what I'm after. They could use the regular search area and put in an id and potentially come up with the listing. I'm trying to have it be more exact. Ideally I wanted the id to take someone to that specific listing right away. There should be a way to make the search only look at the id number and when it finds it, display that listing.

I'll play with it but if anyone knows how to do what I'm trying to do, I'd appreciate it.

Last edited by domino; 09-25-2008 at 05:52 PM.
domino is offline  
Old 09-25-2008, 06:04 PM   #9
curmudgeon
 
Join Date: Mar 2006
Posts: 5,351
Rep Power: 134
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by domino
I'll play with it but if anyone knows how to do what I'm trying to do, I'd appreciate it.
I havent chimed in because I have no idea what you are trying to do.

if you want to view a specific listing then you can just use the URL....

http://mysite.com/viewlisting.php?view=10

where 10 as the ID number of the listing.

I still dont understand what your trying to do though as a big picture. How are you wanting people to be able to make use of the ID number?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 09-25-2008, 06:44 PM   #10
Junior Member
 
Join Date: Aug 2008
Posts: 24
Rep Power: 10
domino is on a distinguished road
Default

No regular user is going to type in the url like that.

Quote:
people could put the site address with an ad number so that people who want more info know they can go to the site and pull up that listing.
For instance, instead of the funky address that is generated, I was hoping that you could have something like mysite.com/123456.php, and that would be the direct link to the listing. If someone had a car for sale or a garage sale and they wanted to direct people to the site to read the listing to get addl details easily, they could use that address. Does that make sense?

But as I look at things, I don't think this is possible. That's not the structure of the links.

Eric suggested putting in a search, which I did and had to edit the code to get it to work, but it doesn't search on just the id number. Now that I play with things more, it seems the regular search form searches just fine if you put in a number. BUT I can't tell if it would return only items with an id number that matches the number you search for or every listing that contains that number in any field.

For instance, if I search for 1234 it's likely searching not only the id field but the address or zip as well.
domino is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display listing ID number and other fields crystal Technical Support 6 06-18-2008 08:10 AM
Free listing package number of ads limitation? z0rg Technical Support 3 02-25-2008 09:30 AM


All times are GMT -4. The time now is 12:30 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0