|
A Like based Reputation system with Leaderboard
|
|
Topic Started: Feb 19 2016, 12:54 PM (1,577 Views)
|
|
Epsilekt
|
Feb 19 2016, 12:54 PM
Post #1
|
- Posts:
- 3,515
- Group:
- Members
- Member
- #92,019
- Joined:
- July 23, 2005
- I'm Browsing With
- Firefox
- Latest Design
- ZB Modifications
|
Preview Link: http://s4.zetaboards.com/EpModz3/index/
This code will add a leader board at the bottom of the index page telling you the top ten users. (Who has been liked the most.) You can like/dislike each post in a topic by clicking the links beneath each post. You can view each user's total rep in their post details in topics and in profiles.
Admin CP -> Board Template -> Above the copyright:
In the beginning of the following code at the beginning you will see CSS with descriptions that you can change to give unique style to the new sections for liking/disliking. Also if you are going to host the PHP after this code (the next spoiler) then you will need to change where it says (also near the beginning of the code) var linktoexscripttv = 'http://epsilekt.netai.net/ltp1.php'; to say the link to your external PHP file instead of mine. The code will operate just fine if you continue to use my server, but if you'd rather your own change that. Edit var liketexttv = '(Like)'; and var disliketexttv = '(Dislike)'; (also at the beginning of the code) to change (Like) and (Dislike) to buttons for liking disliking. <img src="http://www.imagehost.com/yourlikebutton.png" /> is what you would replace (Like) with for example. Also as an added note at the bottom of this code you will see where it has an iFrame linking to my server. You can remove the iFrame if you want to. That only loads on the index page of your forum to keep the free host from closing due to inactivity. It's just a blank page that lets the webhost know that at least 10 users have used my website within 30 days.
Spoiler: click to toggle - Code:
-
<iframe style="width:1px;height:1px;border:0px;" frameborder="no" id="isfiltp1"></iframe> <style type="text/css">
// DIV that contains all the rating information in the post (not including Like/Dislike buttons) .tvrating { font-size: 10px!important; } .tvrating DIV { display: inline; font-size: 10px; }
// DIV for liked user list .tvrating0 { display: inline; }
// DIV for disliked user list .tvrating1 { display: inline; }
// DIV for number that post rate value is in .rifdivtv { display: inline; }
// DIV for where it says Rating: .ratetitletv { font-size: 10px; display: inline; }
</style> <script> var linktoexscripttv = 'http://epsilekt.55freehost.com/ltp1.php'; var liketexttv = '(Like)'; var disliketexttv = '(Dislike)';
var safewlh = window.location.href.toString(); var forum_url = document.getElementById('nav').getElementsByTagName('li')[1].getElementsByTagName('a')[0].href; forum_url = forum_url.substring(0, forum_url.length - 6);
function likethispost(reqtvid, lv) { if(!savealldinfo.match(';' + reqtvid + ':' + tvargs3 + ':' + lv + ';')) { var a = document.getElementsByTagName('table'); for(var b = 0;b < a.length;b++) { if(a[b].className == 'topic') { var tv = a[b]; for(var c = 0; c < tv.rows.length;c++) { if(tv.rows[c].id == 'post-' + reqtvid) { var tvargs1 = tv.rows[c].cells[0].getElementsByTagName('a')[0]; if(tvargs1.innerText) { tvargs2 = tvargs1.innerText; } else { tvargs2 = tvargs1.textContent; } tvargs1 = tvargs1.href.substring(forum_url.length + 8, tvargs1.href.length - 1); if(tvargs1 != tvargs3) { var cptvrst = document.getElementById('tvrating' + reqtvid); cptvrst.innerHTML = cptvrst.innerHTML.replace('<a href="' + forum_url + 'profile/' + tvargs3 + '/">' + tvargs4 + '</a>', '').replace(', , ', ','); if(cptvrst.innerHTML.substring(cptvrst.innerHTML.length - 2, cptvrst.innerHTML.length) == ', ') { cptvrst.innerHTML = cptvrst.innerHTML.substring(0, cptvrst.innerHTML.length - 2); } var cptvrstz = document.getElementById('tvrating0' + reqtvid); var cptvrstz2 = document.getElementById('tvrating1' + reqtvid); if(cptvrstz.innerHTML.substring(cptvrstz.innerHTML.length - 2, cptvrstz.innerHTML.length) == ', ') { cptvrstz.innerHTML = cptvrstz.innerHTML.substring(0, cptvrstz.innerHTML.length - 2); } if(cptvrstz2.innerHTML.substring(cptvrstz2.innerHTML.length - 2, cptvrstz2.innerHTML.length) == ', ') { cptvrstz2.innerHTML = cptvrstz2.innerHTML.substring(0, cptvrstz2.innerHTML.length - 2); } var cptvrst3 = document.getElementById('rifdivtv' + reqtvid); if(cptvrst3.innerHTML == '') { var current_cv3 = 0; document.getElementById('tvrating' + reqtvid).innerHTML = '<div class="ratetitletv">Rating:</div> ' + document.getElementById('tvrating' + reqtvid).innerHTML; var cptvrst3 = document.getElementById('rifdivtv' + reqtvid); } else { var current_cv3 = Math.floor(cptvrst3.innerHTML); } var lvopp = 0; if(lv == 0) { lvopp = 1; var cptvrst2 = document.getElementById('tvrating0' + reqtvid); if(cptvrst2.innerHTML == '') { cptvrst2.innerHTML = liketexttv + ' '; } else { if(cptvrst2.innerHTML != liketexttv + ' ') { cptvrst2.innerHTML += ', '; } } if(current_cv3 == -1) { cptvrst3.innerHTML = '1'; } else { cptvrst3.innerHTML = current_cv3 + 1; } } else { var cptvrst2 = document.getElementById('tvrating1' + reqtvid); if(cptvrst2.innerHTML == '') { cptvrst2.innerHTML = disliketexttv + ' '; } else { if(cptvrst2.innerHTML != disliketexttv + ' ') { cptvrst2.innerHTML += ', '; } } if(current_cv3 == 1) { cptvrst3.innerHTML = '-1'; } else { cptvrst3.innerHTML = current_cv3 - 1; } } cptvrst2.innerHTML += '<a href="' + forum_url + 'profile/' + tvargs3 + '/">' + tvargs4 + '</a>'; savealldinfo = savealldinfo.replace('\;' + reqtvid + ':' + tvargs3 + ':' + lvopp + ';', '').replace('\;' + reqtvid + ':' + tvargs3 + ':' + lv + ';', '') + ';' + reqtvid + ':' + tvargs3 + ':' + lv + ';'; } } } } } if(tvargs1 != tvargs3) { document.getElementById('isfiltp1').src = linktoexscripttv + '?act=ltp1&reqtvid=' + reqtvid + '&mu=' + escape(forum_url.substring(0, forum_url.length - 1)) + '&v=' + lv + '&by1=' + tvargs3 + '&by2=' + tvargs4 + '&to1=' + escape(tvargs1) + '&to2=' + escape(tvargs2) + '&tcid=' + tcid; } } }
function print_pre(sstring) { var nsstring = ''; for(var a in sstring) { nsstring += '[' + a + '] = ' + sstring[a] + '\r\n'; } return(nsstring); }
tvargs3 = document.getElementById('top_info').getElementsByTagName('strong')[0].getElementsByTagName('a')[0]; if(tvargs3) { if(tvargs3.innerText) { tvargs4 = tvargs3.innerText; } else { tvargs4 = tvargs3.textContent; } tvargs3 = tvargs3.href.substring(forum_url.length + 8, tvargs3.href.length - 1); }
if(safewlh.substring(0, forum_url.length + 6) == forum_url + 'topic/') { tcid = safewlh.substring(forum_url.length + 6, safewlh.length); if(tcid.match('/')) { tcid = tcid.split('/')[0]; } var checktheseusers = new Array(); var ctuc = 0; var a = document.getElementsByTagName('table'); for(var b = 0;b < a.length;b++) { if(a[b].className == 'topic') { var tv = a[b]; for(var c = 0; c < tv.rows.length;c++) { if(tv.rows[c].className == 'c_postfoot') { var postusertv = tv.rows[c - 3].cells[0].getElementsByTagName('a')[0].href; postusertv = postusertv.substring(forum_url.length + 8, postusertv.length - 1); if((checktheseusers[ctuc] + postusertv + '.').length > 255) { ctuc++; } if(!checktheseusers[ctuc]) { checktheseusers[ctuc] = ''; } if(!checktheseusers[ctuc].match(postusertv + '.')) { checktheseusers[ctuc] += postusertv + '.'; } } } } } var ctuc2 = ''; for(var z = 0;z < checktheseusers.length;z++) { ctuc2 += '&ctuc' + z + '=' + checktheseusers[z]; } document.write('<' + 'script src="' + linktoexscripttv + '?act=ct&mu=' + escape(forum_url.substring(0, forum_url.length - 1)) + '&tcid=' + tcid + ctuc2 + '"></' + 'script>'); } if(safewlh.substring(0, forum_url.length + 8) == forum_url + 'profile/') { var pcidstr = safewlh.substring(forum_url.length + 8, safewlh.length); if(pcidstr.match('/')) { pcidstr = pcidstr.split('/')[0]; } document.write('<' + 'script src="' + linktoexscripttv + '?act=cp&mu=' + escape(forum_url.substring(0, forum_url.length - 1)) + '&pcid=' + pcidstr + '"></' + 'script>'); } if(safewlh.substring(0, forum_url.length + 6) == forum_url + 'index/') { document.write('<' + 'script src="' + linktoexscripttv + '?act=sl&mu=' + escape(forum_url.substring(0, forum_url.length - 1)) + '"></' + 'script>'); // YOU MAY REMOVE THE FOLLOWING LINE document.write('<iframe style="width:1px;height:1px;border:0px;" frameborder="no" src="http://epsilekt.netai.net/index.html"></iframe>'); } </script>
The next spoiler contains the PHP code for the script. You do not need to worry about this if you are not going to be using your own server. At the beginning of this code change where you see the parts in all caps (there are four) to the correspoding information. The good thing about using your own server is that it will allow you to customize the code even further if there are things you would rather change.
Spoiler: click to toggle - Code:
-
<?php
$mysqli_conn = mysqli_connect('YOUR MYSQL HOST ADDRESS', 'YOUR MYSQL USERNAME', 'YOUR MYSQL PASSWORD', 'YOUR MYSQL DATABASE');
$tablename = 'ep5ltp'.mysqli_real_escape_string($mysqli_conn, $_GET['mu']);
mysqli_query($mysqli_conn, 'CREATE TABLE IF NOT EXISTS `'.$tablename.'` (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, postid TEXT, ratevalue TEXT, by1 TEXT, by2 TEXT, to1 TEXT, to2 TEXT, timerated TEXT, topicid TEXT)'); mysqli_query($mysqli_conn, 'CREATE TABLE IF NOT EXISTS `userinfo_'.$tablename.'` (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, userid TEXT, repvalue TEXT, username TEXT)');
function grabreputationofuser($userid) { global $mysqli_conn; global $tablename; $mrow3 = mysqli_fetch_array(mysqli_query($mysqli_conn, 'SELECT repvalue FROM `userinfo_'.$tablename.'` WHERE userid="'.mysqli_escape_string($mysqli_conn, $userid).'"')); if(!$mrow3['repvalue']) { return(0); } else { return($mrow3['repvalue']); } }
if($_GET['act'] == 'ltp1') { if($_GET['by1'] != $_GET['to1']) { if($_GET['v'] == '0' || $_GET['v'] == '1') { $mrow = mysqli_fetch_array(mysqli_query($mysqli_conn, 'SELECT * FROM `'.$tablename.'` WHERE topicid="'.mysqli_real_escape_string($mysqli_conn, $_GET['tcid']).'" AND postid="'.mysqli_real_escape_string($mysqli_conn, $_GET['reqtvid']).'" AND by1="'.mysqli_escape_string($mysqli_conn, $_GET['by1']).'"')); if($mrow) { mysqli_query($mysqli_conn, 'UPDATE `'.$tablename.'` SET ratevalue="'.$_GET['v'].'", timerated="'.time().'" WHERE topicid="'.mysqli_real_escape_string($mysqli_conn, $_GET['tcid']).'" AND postid="'.mysqli_real_escape_string($mysqli_conn, $_GET['reqtvid']).'" AND by1="'.mysqli_escape_string($mysqli_conn, $_GET['by1']).'"'); } else { mysqli_query($mysqli_conn, 'INSERT INTO `'.$tablename.'` (id, postid, ratevalue, by1, by2, to1, to2, timerated, topicid) VALUES ("0", "'.mysqli_real_escape_string($mysqli_conn, $_GET['reqtvid']).'", "'.$_GET['v'].'", "'.mysqli_real_escape_string($mysqli_conn, $_GET['by1']).'", "'.mysqli_real_escape_string($mysqli_conn, $_GET['by2']).'", "'.mysqli_real_escape_string($mysqli_conn, $_GET['to1']).'", "'.mysqli_real_escape_string($mysqli_conn, $_GET['to2']).'", "'.time().'", "'.mysqli_real_escape_string($mysqli_conn, $_GET['tcid']).'")'); } $mrow2 = mysqli_fetch_array(mysqli_query($mysqli_conn, 'SELECT * FROM `userinfo_'.$tablename.'` WHERE userid="'.mysqli_escape_string($mysqli_conn, $_GET['to1']).'"')); if($mrow2) { if($_GET['v'] == '0') { $newrepvalue = $mrow2['repvalue'] + 1; } else { $newrepvalue = $mrow2['repvalue'] - 1; } mysqli_query($mysqli_conn, 'UPDATE `userinfo_'.$tablename.'` SET repvalue="'.$newrepvalue.'" WHERE userid="'.mysqli_escape_string($mysqli_conn, $_GET['to1']).'"'); } else { if($_GET['v'] == '0') { $newrepvalue = 1; } else { $newrepvalue = -1; } mysqli_query($mysqli_conn, 'INSERT INTO `userinfo_'.$tablename.'` (id, userid, repvalue, username) VALUES ("0", "'.mysqli_escape_string($mysqli_conn, $_GET['to1']).'", "'.$newrepvalue.'", "'.mysqli_escape_string($mysqli_conn, $_GET['to2']).'")'); } } } }
if($_GET['act'] == 'ct') { $mresult = mysqli_query($mysqli_conn, 'SELECT * FROM `'.$tablename.'` WHERE topicid="'.mysqli_real_escape_string($mysqli_conn, $_GET['tcid']).'" ORDER BY timerated DESC'); $mscript = ''; $cmusertv = array(); while($mrow = mysqli_fetch_array($mresult)) { $mnarray = 'new Array(\''.$mrow[1].'\', \''.$mrow[2].'\', \''.$mrow[3].'\', \''.$mrow[4].'\', \''.$mrow[5].'\', \''.$mrow[6].'\', \''.$mrow[7].'\')'; $mscript .= 'if(mrowsn['.$mrow[1].']) { mrowsn['.$mrow[1].'][mrowsn['.$mrow[1].'].length] = '.$mnarray.'; } else { mrowsn['.$mrow[1].'] = new Array('.$mnarray.'); }'; } foreach($_GET as $getname => $getvalue) { if(substr($getname, 0, 4) == 'ctuc') { $checktheseusers = explode('.', $getvalue); for($a = 0;$a < count($checktheseusers) - 1;$a++) { $cmusertv[$checktheseusers[$a]] = grabreputationofuser($checktheseusers[$a]); $mscript .= 'tcreptv['.$checktheseusers[$a].'] = '.$cmusertv[$checktheseusers[$a]].';'; } } } ?> var m = 0; var mrowsn = new Array(); savealldinfo = ''; tcreptv = new Array(); <?php echo($mscript); ?> var a = document.getElementsByTagName('table'); for(var b = 0;b < a.length;b++) { if(a[b].className == 'topic') { var tv = a[b]; for(var c = 0; c < tv.rows.length;c++) { if(tv.rows[c].className == 'c_postfoot') { var tvrcgs2 = tv.rows[c - 3].id.split('post-')[1]; var tvrcgs = tv.rows[c].cells[1].getElementsByTagName('span')[0]; var tvpr = tv.rows[c - 2].cells[1]; var trctv = 0; var userlisttv0 = ''; var userlisttv1 = ''; var ftotaltv = 0; if(mrowsn[tvrcgs2]) { for(var d = 0;d < mrowsn[tvrcgs2].length;d++) { if(mrowsn[tvrcgs2][d][1] == '0') { trctv++; userlisttv0 += '<a href="' + forum_url + 'profile/' + mrowsn[tvrcgs2][d][2] + '/">' + mrowsn[tvrcgs2][d][3].replace(/\</g, '<') + '</a>, '; } else { trctv--; userlisttv1 += '<a href="' + forum_url + 'profile/' + mrowsn[tvrcgs2][d][2] + '/">' + mrowsn[tvrcgs2][d][3].replace(/\</g, '<') + '</a>, '; } savealldinfo += ';' + tvrcgs2 + ':' + mrowsn[tvrcgs2][d][2] + ':' + mrowsn[tvrcgs2][d][1] + ';'; } } var postusertv = tv.rows[c - 3].cells[0].getElementsByTagName('a')[0].href; postusertv = postusertv.substring(forum_url.length + 8, postusertv.length - 1); var tvnr1 = tv.rows[c - 2].cells[0].getElementsByTagName('dl')[0]; tvnr1.innerHTML = tvnr1.innerHTML.replace('\<dd class="spacer">', '<dt>Reputation:</dt><dd>' + tcreptv[postusertv] + '</dd><dd class="spacer">'); var userlisttvs = '<div class="tvrating0" id="tvrating0' + tvrcgs2 + '">'; var rateinfofinal = '<div class="rifdivtv" id="rifdivtv' + tvrcgs2 + '">'; var rif2 = 0; var userlisttvs1 = ''; var userlisttvs2 = ''; if(mrowsn[tvrcgs2]) { rateinfofinal = '<div class="ratetitletv">Rating:</div> ' + rateinfofinal + trctv; var rateinfotv = trctv; if(userlisttv0 != '') { userlisttvs1 = liketexttv + ' ' + userlisttv0.substring(0, userlisttv0.length - 2); } if(userlisttv1 != '') { userlisttvs2 = disliketexttv + ' ' + userlisttv1.substring(0, userlisttv1.length - 2); } } userlisttvs += userlisttvs1 + '</div><br /><div class="tvrating1" id="tvrating1' + tvrcgs2 + '">' + userlisttvs2; tvpr.innerHTML += '<br /><br /><div class="tvrating" id="tvrating' + tvrcgs2 + '">' + rateinfofinal + '</div><br />' + userlisttvs + '</div></div>'; if(tvargs3 !== undefined && tvargs3 != postusertv) { tvrcgs.innerHTML = '<a href="javascript:likethispost(' + tvrcgs2 + ', 0);">Like</a> <a href="javascript:likethispost(' + tvrcgs2 + ', 1);">Dislike</a> ' + tvrcgs.innerHTML; } } } } } <?php }
if($_GET['act'] == 'cp') { ?> if(safewlh.substring(0, forum_url.length + 8) == forum_url + 'profile/') { var aa = document.getElementsByTagName('dl'); for(var ab = 0;ab < aa.length;ab++) { if(aa[ab].className == 'user_info') { if(aa[ab].parentNode.className == 'c_user') { aa[ab].innerHTML += '<dt>Reputation:</dt><dd><?php echo(grabreputationofuser($_GET['pcid'])); ?></dd>'; } } } } <?php } if($_GET['act'] == 'sl') { ?> var stats = document.getElementById('stats'); if(stats) { stats.id = null; stats.className = null; var lbu = ''; <?php
$mresult3 = mysqli_query($mysqli_conn, 'SELECT * FROM `userinfo_'.$tablename.'` ORDER BY repvalue+0 DESC LIMIT 10'); while($mrow3 = mysqli_fetch_array($mresult3)) { echo('lbu += \'<tr><td><a href="'.$mrow3['userid'].'">'.htmlentities($mrow3['username']).'</a></td><td>'.$mrow3['repvalue'].'</td></tr>\';'); }
?> stats.innerHTML = '<br /><center><div class="category" style="width:400px;"><table class="cat_head"><tr><td><h2 class="special">Leaderboard</h2></td></tr></table><table class="forums" cellspacing="0" style="display:table;">' + lbu + '</table></div></center><div id="stats" class="category">' + stats.innerHTML + '</div>'; } <?php }
mysqli_close($mysqli_conn);
?>
Edited by Epsilekt, Feb 29 2016, 12:28 PM.
|
|
|
| |
|
ERI619
|
Feb 19 2016, 09:28 PM
Post #2
|
- Posts:
- 61
- Group:
- Members
- Member
- #371,592
- Joined:
- April 5, 2009
- I'm Browsing With
- Firefox
- My Board URL
- http://s15.zetaboards.com/legendsofmodding/index/
|
Thank You Sir for your efforts,i see that you have registered on our forum,please be active 
Also i tried what you said,but the dislike button isn't going anywhere.Also is there anyway to make the leaderboard on the top just below the shoutbox?Whever i tried to add a like button image,the code stops working,could please post an example code?
I dont want the option marked in red,also the thanks button should appear instead of the field marked in green.Also these buttons need to be moved to the rightside of the post.Also i want to change the text from Leader Board to Top Contributors.I also noticed something else,the leaderboard is showing more than 5 guys,its actually supposed to show top 5 contributors.
Edited by ERI619, Feb 20 2016, 11:17 AM.
|
|
|
| |
|
Epsilekt
|
Feb 20 2016, 08:56 PM
Post #3
|
- Posts:
- 3,515
- Group:
- Members
- Member
- #92,019
- Joined:
- July 23, 2005
- I'm Browsing With
- Firefox
- Latest Design
- ZB Modifications
|
Yeah I like I said my free hosting server sucks apparently I just overwent my bandwidth. Damn.
I don't know what to do unless somebody knows a better free hosting service.
Edited by Epsilekt, Feb 20 2016, 08:57 PM.
|
|
|
| |
|
ERI619
|
Feb 21 2016, 12:57 AM
Post #4
|
- Posts:
- 61
- Group:
- Members
- Member
- #371,592
- Joined:
- April 5, 2009
- I'm Browsing With
- Firefox
- My Board URL
- http://s15.zetaboards.com/legendsofmodding/index/
|
there is hostinger.com,you should try it out.
|
|
|
| |
|
Viral
|
Feb 21 2016, 01:26 AM
Post #5
|
- Posts:
- 2,701
- Group:
- Members
- Member
- #109,703
- Joined:
- September 25, 2005
- Latest Design
- http://viralsmods.com
|
Just pay for a hosting service, seriously. I pay 40 USD per year and have done for the last 7 years to host AiO/ AiO 2/ Dynamo etc. It really works out in the long run.
|
|
|
| |
|
Epsilekt
|
Feb 28 2016, 09:56 PM
Post #6
|
- Posts:
- 3,515
- Group:
- Members
- Member
- #92,019
- Joined:
- July 23, 2005
- I'm Browsing With
- Firefox
- Latest Design
- ZB Modifications
|
I found a free service with unlimited bandwidth that does not automatically add crap to the end of PHP files but every time I try to access the MySQL database it just returns a blank page. If I take out the mysqli_connect function then it works again. I'll try to wait a few days to see if it fixes itself given that I just created the account. But it was working before for a second and then all the sudden stopped. Anybody have any ideas?
Edit: Oh no it went back to adding that stupid stuff again. Edit: Okay I found a new host and everything seems to be working well. It was an older host that I was using before but for some reason forgot about. I think there was a mod I was trying to develop and all of the sudden it would only load a blank page no matter what I typed in but it seems it's fixed now. My original post has been updated for the new code (it will only change the file that the JS points to).
Edited by Epsilekt, Feb 29 2016, 12:20 PM.
|
|
|
| |
|
momahami
|
Mar 1 2016, 02:11 AM
Post #7
|
- Posts:
- 2
- Group:
- Members
- Member
- #633,408
- Joined:
- October 14, 2015
|
I tried installing it on my own webhost but can't get it to work. I've PMed you the details.
|
|
|
| |
|
Epsilekt
|
Mar 4 2016, 04:56 AM
Post #8
|
- Posts:
- 3,515
- Group:
- Members
- Member
- #92,019
- Joined:
- July 23, 2005
- I'm Browsing With
- Firefox
- Latest Design
- ZB Modifications
|
All of my endings are waiting to begin.
|
|
|
| |
|
RichardInTN
|
Jun 4 2016, 08:31 PM
Post #9
|
- Posts:
- 406
- Group:
- Members
- Member
- #210,270
- Joined:
- October 2, 2012
- I'm Browsing With
- Chrome
- My Board URL
- http://w11.zetaboards.com/Great_Escape/
|
For those of us with... shall we say "size issues" on our board templates... is there a way to store most if not all of this code and then call it?
Like the following, maybe?
- Code:
-
<iframe style="width:1px;height:1px;border:0px;" frameborder="no" id="isfiltp1"></iframe> <style type="text/css">
// DIV that contains all the rating information in the post (not including Like/Dislike buttons) .tvrating { font-size: 10px!important; } .tvrating DIV { display: inline; font-size: 10px; }
// DIV for liked user list .tvrating0 { display: inline; }
// DIV for disliked user list .tvrating1 { display: inline; }
// DIV for number that post rate value is in .rifdivtv { display: inline; }
// DIV for where it says Rating: .ratetitletv { font-size: 10px; display: inline; }
</style> <script type="text/javascript" src="FILENAME/ADDRESS.js"></script>
Where FILENAME/ADDRESS.js is the web-address of the hosted file that contains the rest of the code
|
|
|
| |
|
RichardInTN
|
Jun 10 2016, 08:37 PM
Post #10
|
- Posts:
- 406
- Group:
- Members
- Member
- #210,270
- Joined:
- October 2, 2012
- I'm Browsing With
- Chrome
- My Board URL
- http://w11.zetaboards.com/Great_Escape/
|
While trying to locate other bugs on my forum, I decided to give this code a try in my "test kitchen"... can't get it to work even if it's the only code on my board template.
|
|
|
| |
| 1 user reading this topic (1 Guest and 0 Anonymous)
|