WHY?
I have a teaser template that uses {RANDOM/picture/{ARTICLEID}} to display a random image in a teaser that is randomly selected from a sub folder of ./picture of the same name as the article ID.
e.g. a teaser of the article 47 would use a randomly selected imag from the folder picture/47/ by using this tag... {RANDOM/picture/47} in the teaser's template file.
maybe one of the least required hack too but I hope it helps someone add a neat trick to their site.
EDIT: oops forgot to add the hack
opend file...
include/inc_front/content/cnt8.article.inc.php
find line:
Code: Select all
$content['alink']['tr'][$key] = str_replace('{ARTICLELINK}', 'index.php?aid='.$row['article_id'], $content['alink']['tr'][$key]);
Code: Select all
$content['alink']['tr'][$key] = str_replace('{ARTICLEID}', $row['article_id'], $content['alink']['tr'][$key]);//HACK:pSouper add {ARTICLEID replacement tag to display the articleID}
note: this tag is only add to the functionality of the 'teaser' content part
this tag can be viewed in action as the big (random) teaser image on the homepage here... http://www.teensunitefightingcancer.org/index.php (site under construction)