vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Show Thread Enhancements - [AJAX] Threads rating (https://vborg.vbsupport.ru/showthread.php?t=185117)

mad@Max 10-15-2008 11:00 PM

Hm, no, go in the trate template, find all $stylevar[imgdir_rating]/stars.png, and then replace founded items on
HTML Code:

<if condition="in_array($thread[forumid], array(1,2,3,4,...,N)">$stylevar[imgdir_rating]/black_stars.png<else />$stylevar[imgdir_rating]/stars.png</if>
Where 1,2,3,4,...,N forums with different stars. But resolution of different image must be like stars.png.
Must be work:)

mad@Max 10-16-2008 01:49 AM

Mod is updated.
Fixed problem when rating not displaying after voting (on some forums).
Quick fix for those who have this problem. In template trate find
HTML Code:

    <if condition="$show['ratethread'] && $threadinfo['vote']==NULL">
replace with
HTML Code:

    <if condition="$show['ratethread']">
Added hand setting, info in first post.

acast 10-16-2008 11:50 AM

Quote:

Originally Posted by mad@Max (Post 1646014)
Hm, no, go in the trate template, find all $stylevar[imgdir_rating]/stars.png, and then replace founded items on
HTML Code:

<if condition="in_array($thread[forumid], array(1,2,3,4,...,N)">$stylevar[imgdir_rating]/black_stars.png<else />$stylevar[imgdir_rating]/stars.png</if>
Where 1,2,3,4,...,N forums with different stars. But resolution of different image must be like stars.png.
Must be work:)

Hi friend, thank you for helping me. I have this code in showthread:

Code:

<if condition="$rated">
<span id="threadrating_current"><if condition="$show['rating']">$vbphrase[rating]: <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" /></if></span>
<else />
<div align="left"><span class="ratetext">$vbphrase[rate_this_thread] -  <em>$thread[title]</em>.</span></div>
<a name="goto_threadrating"></a>

And this one in threadbit:

Code:

<if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>
My images for ratings are called:

http://www.XXX/enlighten/rating/rating_1.gif
http://www.XXX.com/enlighten/rating/rating_2.gif


... Up to five rating_5.gif


How can i change it so in the template?

mad@Max 10-16-2008 12:28 PM

Use the last version of mod.

acast 10-16-2008 12:40 PM

Quote:

Originally Posted by mad@Max (Post 1646306)
Use the last version of mod.

Sure friend, but you make it the stars with the same PNG image. Could be with different images? I explain you, i have a cinema subforum where i want to have different images for the different ratings instead the film is great, average, poor... and when the post have a rating appears a different image. The change you did makes that use only one image: Stars.png. Isnt it?

Thanks for your answer, i really apreciate your work.

Charles_1 10-29-2008 12:49 AM

Hi mad@max,

your mod is working perfectly (vB 3.6.7), thanks for sharing. But I have one request.

I am also using mod vBi-Gallery for vB 3.6.X (https://vborg.vbsupport.ru/showthread.php?t=128598), which can transform specific sections of forum to simple galleries using own versions of some templates with modifications of layout (for this mod are relevant own versions of templates showthread and threadbit, there are also own verions of postbit and forumdisplay, others are only for gallery purposes like to show newest threads/pictures in forumhome etc.) - in the way of functionality of sections, threads and posts is everything standard, image for gallery is based on ordinary vB attachment in first post - modifications are only in the way of presentation of threads in forumhome and first post in threads). From this reason of own templates your mod "[AJAX] Threads rating" doesn't work or to be more specific the box of rating system doesn't appear in these sections, which are set to be "galleries".

I suppose, that it needs only minor modifications of conditions in some places to appear also in these sections using another versions of templates, but my attempts were useless so far :-(.

Could you please direct me to what is needed to get this work also in mentioned situation with another versions of mentioned templates? I would like to use your rating modification in "gallery showthread" and "standard vB showthread" as well, but if it is too complicated, then I rather choose only "gallery showthread", becouse I really need better presentation of thread rating in these sections.

I really like your solution and I would like to use it also for our "galleries" (I looked for some hack just becouse of using it in our "galleries"). Please, help :-).

mad@Max 10-29-2008 05:10 AM

Wow, how many words:) Please, type your site.

Charles_1 10-29-2008 08:48 AM

Quote:

Originally Posted by mad@Max (Post 1655087)
Wow, how many words:) Please, type your site.

Thanks for fast reply. Our forum is www.svethardware.cz/forum and section with mentioned functionality of simple gallery is for example this: http://www.svethardware.cz/forum/forumdisplay.php?f=212 (we have competition for our users in creating wallpapers on specific topic, every month new round with new topic and this way via only modified templates it is the best for this purpose - I don't want to use for this some special gallery with own database, comments and rating system). For viewing wallpaper (picture) in full size is needed to be logged in, but if you click on name of thread (first row in small boxes in forumdisplay), then you will se own template showthread of this gallery plugin.

Your plugin is disabled for whole forum right now. If you need it to be enabled somewhere for info, just let me know.

Sarthek 10-29-2008 10:17 PM

Installed, tnx

Two questions, if later for some reason (no support or whatever) we unistalled it, ratings still stay?

Can we somehowe enable guests to viewing rating?

Taragon 12-01-2008 05:23 PM

Would it be possible to have the ajax rating bit (stars) only for vb blog as well perhaps?
If preferred after some kind of donation of course.


All times are GMT. The time now is 06:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02144 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete