vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - Site Supporter button in postbit! (https://vborg.vbsupport.ru/showthread.php?t=148119)

Bratz-Designs 05-24-2007 10:00 PM

Site Supporter button in postbit!
 
Hello all,

This small modification was requested here. It will ad a small button to your postbit template.

1. Upload the button.

Pick the button you want to use and rename it to "subscriber.gif" after that upload it to your 'Misc' folder.

2. Change templates Postbit_lecacy and Postbit.

Change the X in the code to the # of the subscribersgroup!

Find:
Code:

                <if condition="$show['postedited']">
                <!-- edit note -->
                        <div class="smallfont">                        <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
                                <em>
                                <phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
                                <if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
                                </em>                        </div>
                <!-- / edit note -->
                </if>

After ad:
Code:

                <!--  Subscriber button -->
<br /><if condition="is_member_of($bbuserinfo, X) "><img src="images/misc/subscriber.gif" border="0"></if>
                <!-- / Subscriber button -->

Mark

SuperTaz 05-26-2007 03:43 PM

reserved

Snatch 05-26-2007 05:57 PM

I use this modification, but it dount show me the image.

If I use this code only "<img src="images/misc/subscriber.gif" border="0">" I see the Image. But when I put the complete Code I can not see the Image. all the same with all usergroup IDs that I have replased the X.

GreeTz
Snatch

ragtek 05-26-2007 06:02 PM

you have to change in if condition="is_member_of($bbuserinfo, X) the x with the groupid!!!

Snatch 05-26-2007 06:05 PM

Quote:

Originally Posted by ragtek (Post 1255090)
you have to change in if condition="is_member_of($bbuserinfo, X) the x with the groupid!!!

Yes I know. I have change it to UID 18 <- that ist my Supporter uID.
Code:

Benutzergruppe: CM-Supporter (ID: 18)
But it dont show me the Image.

ragtek 05-26-2007 06:12 PM

now your code is:
PHP Code:

        <!--  Subscriber button -->
<
br /><if condition="is_member_of($bbuserinfo, 18) "><img src="images/misc/subscriber.gif" border="0"></if>
        <!-- / 
Subscriber button --> 

???

und auf was man hier achten sollte: dieser code f?gt zu einem jeden postbit eine datenbankabfrage hinzu!! also achte auf die performance;)

english:
this code addes to every postbit an query
so if you have 20 posts on a site there will be 20 extraquerys

Snatch 05-27-2007 05:26 AM

Hallo,

nun habe ich den Fehler gefunden, wusste doch, dass ich alles richtig gemacht habe.
Die Grafik kann mit diesem Code nur v?n den Supportern selbst gesehen werden.
Ich m?chte jedoch, dass nur Supporter diese Grafik im Postbit haben, zu sehen sein soll sie aber dann f?r alle. Ich denke die Supporter wissen selbst das sie Supporter sind :)

Mein Englisch ist leider sehr schlecht.

now I have found the problem. With this code, only the supporter usergroup can see the image. But this ist not this what I whant. The supporter usergroup knows that they are supporters. I whant, that the Image only schon in a supporters Postbit but every usergroup can see the Image.

GreeTz
Snatch

ragtek 05-27-2007 07:22 AM

lol

bbuserinfo are the data of the USER WHO IS VIEWING the site

the data of the postuser are saved in the $post-array!
$post[username], $post[statustitle], $post[userid]...
so you have to chack if $post[userid] is in the correct usergroup

pds 05-30-2007 04:58 PM

Having a little trouble getting this working as well. I have the code in the postbit_legacy, and have changed the user group, but can not see the image.

I'll keep playing around and report back.

pds 05-30-2007 05:33 PM

Verified I am having the same issue.

Only members of the specified usergroup can see the image. I was looking to have all users be able to see the image in a users postbit. The thought was that if you saw it in another users postbit, and you did not have it in yours, it may encourage paid subscriptions.


All times are GMT. The time now is 06:53 AM.

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.01062 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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