Thread Rating, Code Tag URLS & MyCode
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #11
RE: Thread Rating, Code Tag URLS & MyCode
I think 1master1 asking a mycode smilar to "/me"

@1master1 : Try to look at post#8 of Yumi. The answer located in that post.

[Image: logo.png]

[Image: twitter.png]
11-15-2010 11:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #12
RE: Thread Rating, Code Tag URLS & MyCode
(11-15-2010 04:14 AM)1master1 Wrote:  when guests visit a thread, they can see the thread rating on top of thread and they are able to rate it even though they dont have permissions. So can we make it display just the already rated or non rated star rating images and remove the rating action for guests as like when a user rates a thread and when he hovers over it again, they will see no current action?
When they hover those star rating images they must not have the option of rating.

Try this (you need conditional for this):

forumdisplay_thread_rating template:

Javascript Code
<script type="text/javascript">
<!--
	Rating.build_forumdisplay({$thread['tid']}, { width: '{$thread['width']}', extra_class: '{$not_rated}', current_average: '{$ratingvotesav}' });
// -->
</script>


Wrap the code above with this conditional:

Code:
<if $fpermissions['canratethreads'] != 0 && $mybb->usergroup['canratethreads'] != 0 then>
The code
</if>


showthread_ratethread template:

HTML Code
<li><a class="one_star" title="{$lang->one_star}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=1&amp;my_post_key={$mybb->post_code}">1</a></li>
<li><a class="two_stars" title="{$lang->two_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=2&amp;my_post_key={$mybb->post_code}">2</a></li>
<li><a class="three_stars" title="{$lang->three_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=3&amp;my_post_key={$mybb->post_code}">3</a></li>
<li><a class="four_stars" title="{$lang->four_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=4&amp;my_post_key={$mybb->post_code}">4</a></li>
<li><a class="five_stars" title="{$lang->five_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=5&amp;my_post_key={$mybb->post_code}">5</a></li>

Please remember that there are 6 <li> in this template. You only need to wrap the last 5 <li>.

Wrap the code above with this conditional:

Code:
<if $forumpermissions['canratethreads'] != 0 && $mybb->usergroup['canratethreads'] != 0 then>
The code
</if>


If you want it only for guest, try to use this kinds of conditional for both of the templates:

Code:
<if $mybb->user['uid'] > 0 then>
Code
</if>


(This post was last modified: 11-16-2010 02:04 AM by RateU.)
11-16-2010 02:03 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #13
RE: Thread Rating, Code Tag URLS & MyCode
Sorry zinga. I didnt mean your post and i pointed out leefish's post. But i don't know that you had already replied to that post while i'm replying. Its a misunderstanding.
Well, i will try out your's and rateu's suggestions.

At mybb, aries-belgium, is creating a mod "while typing". Lol. i thought what its need would be. But it had proved here that it is worth to have it installed on site. I just tested it yesterday as he offered to some users for beta testing and it worked very well, displaying the number of already posted replies while you are making reply to that post.
Thats what happened here. Sorry once again zinga. I dont know that you already replied to that post, and my replying took some time it got posted under yours and pointed yours.
Thank you zinga, the code worked well.
Thank you RateU, it worked fine.

Last one "Code tag URL's" left.
(This post was last modified: 11-16-2010 03:05 AM by 1master1.)
11-16-2010 02:38 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #14
RE: Thread Rating, Code Tag URLS & MyCode
When you submit a reply, at least via AJAX quick reply, it will show the new replies, although I've said the way MyBB does it is a little retarded.

My Blog
11-16-2010 08:17 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #15
RE: Thread Rating, Code Tag URLS & MyCode
That's true zinga. That is what happened with me is the same you mentioned in that bug.
I replied and it redirected me to the last post at top of the browser hiding the above replies. So i thought no one will reply at that time and i left off. This is the cause for the problem.
(This post was last modified: 11-16-2010 06:52 PM by 1master1.)
11-16-2010 06:52 PM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #16
RE: Thread Rating, Code Tag URLS & MyCode
i think, we need to make core edits to change the links in code tag directly to live links?
11-18-2010 07:32 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #17
RE: Thread Rating, Code Tag URLS & MyCode
That's the easiest method, yes.

My Blog
11-18-2010 09:00 PM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #18
RE: Thread Rating, Code Tag URLS & MyCode
Code Tag URLS
its weird that second code tag worked fine showing image when i posted just the tag, but the first and after tags are not replacing with images
12-03-2010 07:45 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #19
RE: Thread Rating, Code Tag URLS & MyCode
when we have multiple codes without end tags, the middle tag is appearing fine , the top and bottom tags are not displayed correctly.
and also only with this regex code
\[info\]

If we have this code
\[info\](.*)$
the output is not at all displayed
12-05-2010 09:58 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #20
RE: Thread Rating, Code Tag URLS & MyCode
something is not good. when we use images for the mycode, they arent being displayed and only first instance of code tag is being displayed, if we use multiple code tags

[info]
[infs]

the [info] tag is displaying the text and not images, while the [infs] tag is being ignored and nothing is displayed.
12-16-2010 12:15 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: