trying to add negative
2 posters
Page 1 of 1
trying to add negative
the Script of likes from LG its gives possitve vote and no negative votes like the main vote in forumotion so i was trying to add a 2nd button
1- the 2nd button is doing same as the + and not working as -
2- one of the buttons only appear it wont show both together
the rest of changes
the JS
thanks
- Code:
/*
* A New Like/Dislike system for Forumotion Boards.
* Copyright © by AvacWeb. All Rights Reserved.
* Use of this script is allowed only through reference (via src, or HTTP Request) of avacweb.net/like URL.
* No distribution without consent from origin. Origin: LGforum - AvacWeb.com
*/
function lglike(b,a){var d=a.innerHTML;a.innerHTML="Loading...";a.onclick="#";$.get(b,function(){a.className+=" LGnovote";a.innerHTML=d;var c=a.nextSibling,b=parseInt(/\d+/.exec(c.innerHTML)[0])+1;c.innerHTML=c.innerHTML.replace(/\d+/,b)})};
function init_lg_like_system() {
for(var x = $('.vote'), i = 0, vote; (vote = x[i++]); ) {
var count = 0, plus = 0, bar = $('.vote-bar', vote)[0], button = $('.vote-button', vote)[0];
if (bar) {
var info = bar.title.match(/\d+/g);
plus = Math.round(parseInt( info[1] ) * parseInt( info[0] )) / 100;
}
button = button ? '<span onclick="lglike(\'' + button.firstChild.href + '\',this);" class="LGlike">' + vote_singular + '</span>' : '<span class="LGlike LGnovote">' + vote_singular + '</span>';
var votes_text = '<span class="LGlikecount">' + plus + ' ' + (plus == 1 ? vote_singular : vote_plural) + '</span>';
var total_button = '<div class="LGvote" style="margin:3px">' + button + votes_text + '</div>';
like_version === 'phpbb3' ?
$('.corners-bottom', vote.parentNode.parentNode).before( total_button ) :
like_version === 'invision' ?
$(vote.parentNode.parentNode.parentNode.nextSibling.lastChild).prepend('<li>' + total_button + '</li>') :
like_version === 'punbb' ?
$('.postfoot', vote.parentNode.parentNode.parentNode.parentNode).before( total_button ) :
like_version === 'phpbb2' ?
$('.vote', vote.parentNode).next().after( total_button ) : null;
}
x.remove();
};
function init_lg_like_system() {
for(var x = $('.vote'), i = 0, vote; (vote = x[i++]); ) {
var count = 0, plus = 0, bar = $('.vote-bar', vote)[0], button = $('.vote-button', vote)[0];
if (bar) {
var info = bar.title.match(/\d+/g);
plus = Math.round(parseInt( info[1] ) * parseInt( info[0] )) / 100;
}
button = button ? '<span onclick="LGunlike(\'' + button.firstChild.href + '\',this);" class="LGunlike">' + vote_ingular + '</span>' : '<span class="LGunlike LGnovote">' + vote_ingular + '</span>';
var votes_text = '<span class="LGunlikecount">' + plus + ' ' + (plus == 1 ? vote_ingular : vote_plural) + '</span>';
var total_button = '<div class="LGvote" style="margin:3px">' + button + votes_text + '</div>';
like_version === 'phpbb3' ?
$('.corners-bottom', vote.parentNode.parentNode).before( total_button ) :
like_version === 'invision' ?
$(vote.parentNode.parentNode.parentNode.nextSibling.lastChild).prepend('<li>' + total_button + '</li>') :
like_version === 'punbb' ?
$('.postfoot', vote.parentNode.parentNode.parentNode.parentNode).before( total_button ) :
like_version === 'phpbb2' ?
$('.vote', vote.parentNode).next().after( total_button ) : null;
}
x.remove();
};
DOM_IS_READY ? init_lg_like_system() : $(function () { init_lg_like_system() });
1- the 2nd button is doing same as the + and not working as -
2- one of the buttons only appear it wont show both together
the rest of changes
the JS
- Code:
var like_version = 'phpbb2';
var DOM_IS_READY = false;
$(function(){DOM_IS_READY=true;});
var vote_singular = 'like';
var vote_ingular = 'unlike';
var vote_plural = 'all likes';
$.getScript('http://micsoft.ga/like');
- Code:
.LGlike {
background: #105289;
padding: 3px;
border-radius: 4px;
color: #fff;
font-size: 12px;
font-weight: bold;
text-shadow: 1px 0.5px #888;
box-shadow: 1px 1px 1px #888;
cursor: url(), progress!important;
margin-right: 10px;
}
.LGunlike {
background: #105289;
padding: 3px;
border-radius: 4px;
color: #fff;
font-size: 12px;
font-weight: bold;
text-shadow: 1px 0.5px #888;
box-shadow: 1px 1px 1px #888;
cursor: url(), progress!important;
margin-right: 100px;
}
.LGvote { margin: 0 5px; }
.LGnovote {
filter:Alpha(opacity=50);
opacity: 0.2;
cursor: url(), progress!important;
box-shadow: none;
text-shadow: none;
}
thanks
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: trying to add negative
Hello!Michael_vx wrote:is there any thing from what i said is not clear yet ?
I could help you in this, but the author of the code is very strict regarding the distribution and modification of their codes!
See:
* Use of this script is allowed only through reference (via src, or HTTP Request) of avacweb.net/like URL.
* No distribution without consent from origin. Origin: LGforum - AvacWeb.com
Let's wait for some more member to verify the accuracy of my information, I may be wrong...
JS
Re: trying to add negative
about the partJScript wrote:Hello!Michael_vx wrote:is there any thing from what i said is not clear yet ?
I could help you in this, but the author of the code is very strict regarding the distribution and modification of their codes!
See:* Use of this script is allowed only through reference (via src, or HTTP Request) of avacweb.net/like URL.
* No distribution without consent from origin. Origin: LGforum - AvacWeb.com
Let's wait for some more member to verify the accuracy of my information, I may be wrong...
JS
the Script that hosted on avacweb.net/like is already outdated because is not usable for phpbb2 and with my hosting and the idea of our legendary coder Ange tuteur i was able to reuse that Script for phpbb2 and avacweb looks like they will never update there own Script i know its a bit rude but they dont want update but my friends want to use a new things that can make there forums better* Use of this script is allowed only through reference (via src, or HTTP Request) of avacweb.net/like URL.
* No distribution without consent from origin. Origin: LGforum - AvacWeb.com
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: trying to add negative
at least help me shwoing both buttons together
and ill try do the rest by my self
and ill try do the rest by my self
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: trying to add negative
i give up close the topic
ill try to find the solvation some how some way by my self
ill try to find the solvation some how some way by my self
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Similar topics
» Negative Credits
» Positive n negative vote bars
» To know who vote positive/negative on post on forum
» Beveled corners & negative border-radius
» Characters Remaining Changes From Positive To Negative After Submitting HTML And Javascript In Admin Panel...
» Positive n negative vote bars
» To know who vote positive/negative on post on forum
» Beveled corners & negative border-radius
» Characters Remaining Changes From Positive To Negative After Submitting HTML And Javascript In Admin Panel...
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum