#1 (permalink)  
Old 01-27-2008, 01:16 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Post smarty tag <%$keywords|

Hi

I have been looking for a thread or some documentation either on the Nicecoder community and the smarty website, but im struggling to pinpoint.

Basically im modifying the rows.html to display the keywords tag but I don’t want all keywords displayed for the listing. I would like to truncate the keywords tag to display the first 4 keywords.

Is there a switch to add to the end of the <%$keywords| to display this?

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-27-2008, 01:36 PM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
Default

i think you can only truncate to a certain number of characters, not words, if you want to do that its:

<%$keywords|truncate:150%> to trim to 150chars.
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
Reply With Quote
  #3 (permalink)  
Old 01-27-2008, 02:06 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Default

Thanks inspireme this works, but i had to apply this to the details_link.html page just to test as the <%$keywords$> tag on rows.html only returns the phrase "ARRAY".

Does this mean i have to ad the varible somewhere to get it working on this page?
Reply With Quote
  #4 (permalink)  
Old 01-28-2008, 12:31 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Default

bump on this thread anyone

Pleaase
Reply With Quote
  #5 (permalink)  
Old 01-29-2008, 03:23 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Default

%$keywords$> tag on rows.html only returns the phrase "ARRAY".

Does this mean i have to ad the varible somewhere to get it working on this page?
Reply With Quote
  #6 (permalink)  
Old 01-29-2008, 04:55 PM
FSGDAG's Avatar
Moderator
 
Join Date: May 2007
Location: NJ, United States
Posts: 977
FSGDAG is on a distinguished road
Default

I'm far from being a programmer, but I'm pretty sure its suppose to be <%$keywords%> not <%$keywords$>
__________________
FSGDAG | IndexU Hosting | Owner
Website | NiceCoder Script Hosting and More! | Blog
General Directory | Deep Links Directory | Bidding Directory
Reply With Quote
  #7 (permalink)  
Old 01-29-2008, 05:04 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Default

sorry, typo on the thread....

its correct code on rows.html, wonder why its displaying "array" when <%$keywords%> is dropped there?
Reply With Quote
  #8 (permalink)  
Old 01-29-2008, 05:40 PM
FSGDAG's Avatar
Moderator
 
Join Date: May 2007
Location: NJ, United States
Posts: 977
FSGDAG is on a distinguished road
Default

Ok...

I'm going to take a stab at this.... <%$keywords%> works on the detail_links.html page but doesn't work on rows.html.

If I'm correct, detail_links.html uses detail.php in the root, and rows.html uses browse.php in the root.

If we look at detail.php in the root we see :

Code:
Content visible to License Owner only.
and if we look at browse.php we see this :

Code:
Content visible to License Owner only.
So whats the difference between the two???

In detail.php, the keywords are being called here:

Code:
Content visible to License Owner only.
and here:

Code:
Content visible to License Owner only.
So I'm guessing that in browse.php you need to add $link_keywords to your //var templates and add $link_keywords = strip_tags($row["keywords"]); around line 60.

Now after I typed all of this out, I just noticed that there is a $meta_keywords being called in browse.php. What that means, I have NO IDEA!!! LOL

I'm putting my disclaimer in here:

DISCLAIMER : Following my advice has been known to cause sparatic tornadoes, higher CO2 emissions, and in some small cases, nuclear winter! Think about this before doing anything I say!!!!!

My advice... Allow someone 1,000,000 times smarter than me on this board to tell you if I'm right or completely wrong!!!
__________________
FSGDAG | IndexU Hosting | Owner
Website | NiceCoder Script Hosting and More! | Blog
General Directory | Deep Links Directory | Bidding Directory
Reply With Quote
  #9 (permalink)  
Old 01-31-2008, 12:26 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Post

Thanks for the help FSGDAG, I thought it had to be browse.php, unfortunately to no avail nice try

I would like to see some documentation on how indexu html files relate back to the appropriate php, and to see a guide for template variables.

I have some more questions to ask, but dont want to start another thread till I have this sorted.

BTW roflma disclaimer I have backups so do your worst, thanks for your help
Reply With Quote
  #10 (permalink)  
Old 01-31-2008, 01:05 PM
FSGDAG's Avatar
Moderator
 
Join Date: May 2007
Location: NJ, United States
Posts: 977
FSGDAG is on a distinguished road
Default

Code:
Content visible to License Owner only.
Sorry it didn't work I'm sure there is an answer out there though

Code:
Content visible to License Owner only.
Yeah, Al Gore threatened to sue me if I didn't start posting those disclaimers! He gets his panties all up in a ruffle over stuff like that
__________________
FSGDAG | IndexU Hosting | Owner
Website | NiceCoder Script Hosting and More! | Blog
General Directory | Deep Links Directory | Bidding Directory
Reply With Quote
Reply

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
Smarty AND/OR beto v5.x 2 12-18-2006 05:29 AM
Smarty - Detail.html - Keywords ezykiwi v5.x 2 09-30-2006 08:17 AM
Smarty Errors kevinrstruck v5.x 2 04-02-2006 06:55 PM
smarty code vittle v5.x 1 02-21-2006 06:11 PM
More smarty plugins dody v5.x 1 12-16-2005 10:33 PM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 04:43 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate