* Lordeagle Please help me am trying to create tags with these codes
<div data-xtcontainer="container" class="xt_container" id="tag">
Tags Here
    </div>
<script>
Tag = "http://eaglenet.xtgem.com/search?q="
var pageTitle = document.title;
 tags = [pageTitle.split(" ");}
var i;
for (i=0;i<tags.length;i  ){
Tag  = tags[i] " ">" tags[i] "</a>";
}
 document.getElementById("tag").innerHTML= Tag;

</script>

Copy code
2015-08-31 05:20 · (0)
* Graham * Lordeagle This is my version
it takes the page title splits it up at the spaces and creates a search link for each word
<div data-xtcontainer="container" class="xt_container" id="tag"></div>
<script>
var pageTitle = document.title;
tags = pageTitle.split(" ");
var target=document.getElementById('tag');
for (i=0;i<tags.length;i++ ){
var link= document.createElement("a");
link.setAttribute('href', 'http://eaglenet.xtgem.com/search?q='+tags[i]);
link.setAttribute('class', 'xt_button');
var text = document.createTextNode(tags[i]); 
link.appendChild(text);
target.appendChild(link);
}
</script>

Copy code

http://auldphart.yn.lt/tagtest
2015-08-31 09:13 (edited 2015-08-31 09:31 by Graham ) · (0)
* Lordeagle * Graham Splendid! Thanks it worked.
2015-08-31 16:31 · (0)
* Lordeagle * Lordeagle After creating a display page for the above tags I found it most useful if i can use the same way to create an advanced filesearch using css and js please help me from where I made mistake
<script type="text/javascript">
function searchFiles(){
var styl = document.createElement("style");
var ppt = document.createTextNode("{display:block}");
var kwd = document.forms["srchfrm"]["srch"].value;
var clasis = kwd.split(" ");
for(i=0;i<clasis.length;i++){
var lst = styl.appendChild("."+clasis[i]+ppt);
document.getElementsByTagName("head")[0].appendChild(lst);}
if (kwd==null || kwd==""){return false;}}
</script>

Copy code

Demo on Tags http://eaglenet.xtgem.com/search?fold=/music/witprev&img=/music/zicon/Olamide_feat_Seriki_feat_Chinko_Ekun_feat_Phyno_Swag_On.mp3.png&q=Swag
2015-09-01 01:53 · (0)
* Graham * Lordeagle This seems to work it creates the style tag and the classes anyway
this has to read the value directly from the form
if you want it to take its value from the submitted search variable
change
var kwd = document.forms["srchfrm"]["srch"].value;
to
var kwd = "{_$srch|}";

<script type="text/javascript">
function searchFiles(){
var kwd = document.forms["srchfrm"]["srch"].value;
if (kwd==null || kwd==""){return false;}
var clasis = kwd.split(" ");
var styl = document.createElement("style");
for(i=0;i<clasis.length;i++){
var tmp = document.createTextNode("."+clasis[i]+"{display:block}");
styl.appendChild(tmp);}
document.head.appendChild(styl);}
</script>

Copy code
2015-09-01 13:39 (edited 2015-09-01 23:35 by Graham ) · (0)
* Lordeagle * Graham I tried them but all to no avail below is the source code of the page
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
<style>
div.product
{
    display: none;
}
</style>
    <title>Files Tagged With {_$q|}</title>
</head>
<body>
<div class="lordeagle"><h2 class="name">List Of Files That Are Tagged With {_$q|}
</h2></div><xt:code><form id="srchfrm" onsubmit="return searchFiles()" action="<xt:url />" method="get">
<div class="search lordeagle">
<input type="search" name="kwd" value="{_$kwd|}"/>
<input type="submit" value="search" />
</div>
</form>
</xt:code><xt:code><script type="text/javascript">
function searchFiles(){
var kwd = {_$srch|}
if (kwd==null || kwd==""){return false;}
var clasis = kwd.split(" ");
var styl = document.createElement("style");
for(i=0;i<clasis.length;i  ){
var tmp = document.createTextNode("div." clasis[i] "{display:block}");
styl.appendChild(tmp);}
document.head.appendChild(styl);}
</script></xt:code><xt:code><div class="lordeagle"><h2 class="name">MUSICS, SONGS AND RINGTONES {_$kwd|}
</h2></div>
<div class="section product-list">
<xt:filelist sort_type="updated" sort_dir="desc" folder="/music/witprev" template="&lt;div class='.file_name_parsed. product'&gt;&lt;a class='product-link' href='http://click.buzzcity.net/click.php?partnerid=136453' title='.file_name.'&gt;&lt;div class='pull-left'&gt;&lt;img class='product-icon' src='/music/zicon/.file_name..png' alt='.file_name.'&gt;&lt;div class='info'&gt;&lt;h5&gt;.file_name_base_parsed.&lt;/h5&gt;&lt;img src='/tools/work/ratings/64_stars_50.png' alt='5.0' title='rated 5.0' class='rating'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='pull-right'&gt;&lt;a href='/download?file=.file_name.&name=.file_name_parsed.&category=.file_mime.&size=.file_size.&href=.file_url.&date=.file_date.&time=.file_time.&fold=/music/witprev&img=/music/zicon/.file_name..png'class='btn' title='download .file_name.' style='background-color:#d20808;'&gt;download&lt;/a&gt;&lt;/div&gt;&lt;/a&gt;&lt;/div&gt;" filter="*.*" /></div></xt:code>

</body>
</html>

Copy code
the page is @ http://eaglenet.xtgem.com/others/Search pls help me run a check there bcus certainly the classes are not.
2015-09-02 06:03 · (0)
* Graham * Lordeagle Remember this has to run when the page returns to the browser not before it leaves when the form is submitted try using the function in a onload call on the body tag <body onload="searchFiles()">
My test works just fine
http://auldphart.yn.lt/tagtest?srch=test+me+now
2015-09-02 09:16 (edited 2015-09-02 09:39 by Graham ) · (0)
* Lordeagle * Graham Thanks now working fine!
2015-09-02 20:47 · (0)
* Lordeagle * Graham I have intension of adding this filelist using xtscript but I dont like wasted effort so tell me if it will work? Dont do it 4 me, I will like to do it myself if its gona work but if I fail I will call 4 ur help but just wana know if it will work for now it works on my download page using variables
<script type="text/javascript"> var count='<xt:widget id="xt.c.a.t." tool="Counter"  key="xxxxx" xtuser= "lordeagle" call=".file_name."/>'; if (count>=100) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_50.png' alt=''/>");} else if (count>=80) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_45.png' alt=''/>");} else if (count>=60) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_40.png' alt=''master/>");} else if (count>=40) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_35.png' alt=''/>");} else if (count>=30) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_30.png' alt=''/>"); } else if (count>=20) { document.write("<img src='http://eaglenet.xtgem.com/rating//tools/work/ratings/64_stars_25.png' alt=''/>"); } else if (count>=10) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_20.png' alt=''/>");} else if (count>=5) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_15.png' alt=''/>"); } else if (count>=1) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_10.png' alt=''/>"); } else if (count>=0) { document.write("<img src='http://eaglenet.xtgem.com//tools/work/ratings/64_stars_05.png' alt=''/>");} else {document.write("0.0"); }</script>
Copy code
2015-09-03 11:11 · (0)
* Graham * Lordeagle The code will work
but the the xtcat counter is not a hit counter it is a page counter that's why in my version the counter is only updated on the landing page
The ones in the actual filelist are the display only mode of the counter (type="display1")
http://ggnnww.yn.lt/all_tricks_filelist
also you can make most of this into a separate javascript function and just call it from the filelist using the counter as a variable
2015-09-03 21:01 (edited 2015-09-03 21:12 by Graham ) · (0)

Online: Guests: 1