Home » Wapka Codes 2022 » how to build real rating 5 star by %total% count
657
76
Home » Wapka Codes 2022 » how to build real rating 5 star by %total% count
mario
mario
5 months ago
Hello i heard you want to build a rating 5 star image for a content like post,musics,videos
All you need are here.
Step 1
build a page called "count.js"
--/count.js
---Api Data Lister
----configuration:
<'pid>:GET(postid);<'/pid><'limit>1<'/limit><'key1>rates<'/key1>
----code(header):
document.getElementById(":GET(postid);star1).src = ":VALUE(%total%).IFGE(10).THEN(yellowstar.png).ELSE(greystar.png);"
document.getElementById(":GET(postid);star2).src = ":VALUE(%total%).IFGE(20).THEN(yellowstar.png).ELSE(greystar.png);"
document.getElementById(":GET(postid);star3).src = ":VALUE(%total%).IFGE(30).THEN(yellowstar.png).ELSE(greystar.png);"
document.getElementById(":GET(postid);star4).src = ":VALUE(%total%).IFGE(40).THEN(yellowstar.png).ELSE(greystar.png);"
document.getElementById(":GET(postid);star5).src = ":VALUE(%total%).IFGE(50).THEN(yellowstar.png).ELSE(greystar.png);"
----code:
:NULL();
Now create new page called "newsfeed.html" etc.
--/newsfeed.html
---api lister or any
attach
<!!postbox start!!>contents etc <img id="%id%star1"><img id="%id%star2"><img id="%id%star3"><img id="%id%star4"><img id="%id%star5"> then make sure these script is under <script src="/count.js/?postid=%id%"></script>
<!!postbox closed!!> the box of the content you are listing
---attach key1-rates when adding comments,likes,etc pointed to the id api lister data.
comment |
Recent Comments