Support Forums


Go Back   68 Classifieds Forums > Help & Support > v4 Questions & Support

Notices

 
LinkBack Thread Tools Display Modes
Old 03-07-2009, 12:01 PM   #1
Member
 
HorseOptions's Avatar
 
Join Date: Dec 2008
Posts: 79
Rep Power: 3
HorseOptions is on a distinguished road
Question Creating a link to view ad in users admin panel

I noticed in the Browse Your Listings window under My Account that there isn't a place where the user can click to view their ad. I've been trying to accomplish this by putting a link under the title of their ad , but I seem to have hit a speed bump. Here's what I have in the Template Editor > Default > Users > usersbrowselistings.tpl (using hosted Developer's edition 4.0.9):

<a href="{$smarty.const.URL}/listing/{$entry.id}/{$entry.title}.html">-View Your Ad</a>

which produces

http://www.horseoptions.com/listing/180/FREE%20Ads.html

it should be

http://www.horseoptions.com/listing/180/FREE_Ads.html

Everything is good, except for the "%20" that it uses instead of the "_". Any suggestions?

Thanks!

Rob Shurtleff - Marketing
On behalf of Lin Shurtleff - Webmaster
HorseOptions.com

PS. Eric Barnes & 68Classifieds Rocks!
__________________
Rob Shurtleff - Marketing
Lin Shurtleff - Webmaster
www.HorseOptions.com
Hosted Edition V4.0.9

Last edited by HorseOptions; 03-07-2009 at 12:08 PM.
HorseOptions is offline   Reply With Quote
Old 03-07-2009, 12:17 PM   #2
Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,397
Rep Power: 41
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

Quote:
Originally Posted by HorseOptions View Post
I noticed in the Browse Your Listings window under My Account that there isn't a place where the user can click to view their ad. I've been trying to accomplish this by putting a link under the title of their ad , but I seem to have hit a speed bump. Here's what I have in the Template Editor > Default > Users > usersbrowselistings.tpl (using hosted Developer's edition 4.0.9):

<a href="{$smarty.const.URL}/listing/{$entry.id}/{$entry.title}.html">-View Your Ad</a>

which produces

http://www.horseoptions.com/listing/180/FREE%20Ads.html

it should be

HorseOptions.com - Online Classifieds for Everything Equine � FREE Ads

Everything is good, except for the "%20" that it uses instead of the "_". Any suggestions?!
It creates the "%20" because that is the HTML equivalent of the <space>. If you had a <space> in an actual URL it wouldn't work. What I'm confused about is that your posted URLs versus the code, the link itself in viewing the page should actually be "-View Your Ad". I assume that is what is actually showing, but your talking about the actual link that it produces.

I haven't tested this, but I believe you can use the built in Smarty function to replace the "%20" that is generated like this:
<a href="{$smarty.const.URL}/listing/{$entry.id}/{$entry.title|replace'%20':'_'}.html">-View Your Ad</a>

-Mike
__________________
Mike-N-Tosh
v3.1.10 Developer IndianaPC.org - A community website
Sandbox v4.0.9, 4.1
Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds.
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 03-07-2009, 04:40 PM   #3
Member
 
HorseOptions's Avatar
 
Join Date: Dec 2008
Posts: 79
Rep Power: 3
HorseOptions is on a distinguished road
Default

Thanks for the help. I gave that a try, but it just made that whole portion of the page go blank. Any other suggestions?

Thanks!
__________________
Rob Shurtleff - Marketing
Lin Shurtleff - Webmaster
www.HorseOptions.com
Hosted Edition V4.0.9
HorseOptions is offline   Reply With Quote
Old 03-07-2009, 05:51 PM   #4
Member
 
HorseOptions's Avatar
 
Join Date: Dec 2008
Posts: 79
Rep Power: 3
HorseOptions is on a distinguished road
Talking I got it!

I figured it out. What made is work was to use the following:
<a href="viewlisting.php?view={$entry.id}">-View Your Ad</a>
__________________
Rob Shurtleff - Marketing
Lin Shurtleff - Webmaster
www.HorseOptions.com
Hosted Edition V4.0.9
HorseOptions is offline   Reply With Quote
Old 03-07-2009, 06:56 PM   #5
Moderator
 
 
Join Date: Mar 2008
Posts: 839
Rep Power: 22
seymourjames has a spectacular aura about
Default

Yes you got it but just something I do - <a href={$smarty.const.URL}/viewlisting.php?view={$entry.id} target="_blank">{$entry.title}</a>

The target="_blank" puts the advert up in an new window. It seems to make a better workflow rather than going back and forth in my opinion - your choice.

Also as a search engine is not accessing behind the login (well it shouldn't be) then the fact that you lose your search engine friendly url does not really matter. I say that for completeness to save the question being asked by somebody else.

If you do want to have a search engine friendly url then you will need to consider not just replacing those spaces but stripping out a range of other 'special' characters like the comma, etc to format all the possible links correctly. Examples of this can be found in several other places in the system (e.g; look at feature_listing plugins and I think external.php has some stuff to do that or did). It will be a little more complicated as well because I notice you are using iso-8859-1.
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 03-07-2009, 07:00 PM   #6
Member
 
HorseOptions's Avatar
 
Join Date: Dec 2008
Posts: 79
Rep Power: 3
HorseOptions is on a distinguished road
Smile

Very good ideas and thoughts. Thanks so much!!
__________________
Rob Shurtleff - Marketing
Lin Shurtleff - Webmaster
www.HorseOptions.com
Hosted Edition V4.0.9
HorseOptions is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Customer URL in Admin Panel dphibb v4 Questions & Support 1 10-18-2008 08:10 PM
Creating a link to seller contact form using anchor abkeller v3.1 Questions & Support 3 01-08-2008 01:02 PM
Admin Panel Not available PilotPete v3.1 Questions & Support 8 10-11-2006 08:46 AM
category link - admin panel juven14 v3.1 Questions & Support 7 06-27-2006 03:57 PM
Admin Panel Unregistered v3.0 Questions & Support 1 03-28-2006 05:40 PM


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


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