Welcome, Guest
Please Login or Register.    Lost Password?

Code for searching on Tags
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Code for searching on Tags
#2157
Code for searching on Tags 1 Year, 11 Months ago Karma: 0
I thought someone might find this useful. I was tasked with making the tags for a video click through and run a search based on the individual tag.
In the "components\com_jvideodirect\views\play\tmpl\default.php", where the tags are output I changed
Code:


echo $this->v->tags;


to:
Code:


$tags_array = Array();

$tags = $this->v->tags;
$tags_array = explode(", ",$tags);

 foreach($tags_array AS $tag){
  print "<a href=\"".JURI::ROOT()."index.php?searchword=$tag&amp;ordering=newest&amp;searchphrase=any&amp;limit=20&amp;areas[0]=jVideoDirect&amp;option=com_search\">$tag</a>, ";
 }

hathwaytech
(Free Member)

Senior Boarder
Posts: 47
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2159
Re: Code for searching on Tags 1 Year, 11 Months ago Karma: 16
great job, make sure jvd's search plugin is installed.
otherwise it will not work.
cassie
jVideoDirect staff
Posts: 1114
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: cassie, tanny, ethan