Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Usergroup Specific Adverts Details »»
Usergroup Specific Adverts
Version: 1.0.1, by Chris M Chris M is offline
Developer Last Online: Feb 2013 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 06-13-2005 Last Update: 10-21-2005 Installs: 37
Uses Plugins Template Edits
 
No support by the author.

[high]Installation Instructions[/high]

Step 1: Upload the .xml file to the Product Manager
Step 2: Edit the [high]global_advert[/high] template to add your advert code, i.e. Google Adsense code
Step 3: Add the variable [high]$advert[/high] to any of the following templates: [high]header, navbar, footer[/high] - I placed mine at the top of the navbar template to make it show like it does in the screenshots
Step 4: Alter the plugin code to reflect your premium members/staff usergroups so that they do not see the ads (if you don't want them to)

To do so, edit:
PHP Code:
if (!in_array($vbulletin->userinfo['usergroupid'], array(567))) { 
replacing, obviously, [high]5, 6, 7[/high] with whatever usergroups you need
Step 5: Click [high]INSTALL[/high]

To see what it looks like (yes I used a hideous h1 tag and red font to make the point out) take a look at the screenshots...

[high]Updates[/high]
Version 1.0.1: Simple update to make this work globally - This will show up in every page - To upgrade, remove the forumhome_advert template, delete the existing plugin and follow the installation instructions above

Chris

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 07-30-2005, 12:10 PM
Chris_D Chris_D is offline
 
Join Date: Jun 2004
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great
Reply With Quote
  #33  
Old 10-05-2005, 11:57 PM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this be updated for 3.5 gold or is it good as is? I'm interested in using this .
Reply With Quote
  #34  
Old 10-06-2005, 09:50 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Currently this should work as is - There may be tweaks that can be made for 3.5 Gold but I honestly can't forsee any at the moment - It is best to assume that it is compatible and then if any issues arise they can be fixed

Chris
Reply With Quote
  #35  
Old 10-11-2005, 01:28 PM
Julie's Avatar
Julie Julie is offline
 
Join Date: Mar 2005
Location: Oslo, Norway
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uhh, is it possible to have this work with secondary usergroups? Because I've set up my forum so that a paying user gets a secondary usergroup (without changing their primary usergroup)... Is there a way to have so that you can add secondary usergroup ids as well? Thanks.
Reply With Quote
  #36  
Old 10-11-2005, 02:59 PM
n1ckn4me n1ckn4me is offline
 
Join Date: Jan 2005
Location: The Netherlands
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi nice hack! it's got some potention in my opinion.

I have for example some plain text I only want to show at some places of my vbsite. so I place the $advert outthere and I copy the code within the plugin from "global_start" and than add the idusergroup numbers exept for id1 (guests). This way you probably tell that every idgroup does not see it.

Is there a way to invert that? so you just place the useridgroup-numbers who WILL see it? (it's just that it tires my mind to think the other way around i guess )

further more...nice plugin
Reply With Quote
  #37  
Old 10-13-2005, 11:17 PM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Julieh
Uhh, is it possible to have this work with secondary usergroups? Because I've set up my forum so that a paying user gets a secondary usergroup (without changing their primary usergroup)... Is there a way to have so that you can add secondary usergroup ids as well? Thanks.
Yes I agree. I want to use it but it doesn't seem to work that way yet. I have my forums set up so by doing certain things you are sent to another primary group. I would much rather just make a subscription that says you are a secondary user of this group which prevents you from seeing ads rather then figure out a whole new promotion scheme.

Is there a way to include secondary groups you select as well as primary?
Reply With Quote
  #38  
Old 11-22-2005, 10:50 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit the plugin, and change:
PHP Code:
if (!in_array($vbulletin->userinfo['usergroupid'], array(567))) { 
to
PHP Code:
if (!(is_member_of($vbulletin->userinfo, array(567)))) { 
That should work

Chris
Reply With Quote
  #39  
Old 11-25-2005, 05:41 PM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup that worked flawlessly . Maybe that could be the default in the product or even just another attachment something like "Use only primary groups" and another "Check both primary and secondary". I attached the edited version of your product if you want to throw it up alongside the first for those that want it to apply for both primary and secondary groups. I didn't rename it or anything of the sort I just went through with PSPad and changed the line .
Reply With Quote
  #40  
Old 12-06-2005, 03:20 AM
Q-v-n-s-Q Q-v-n-s-Q is offline
 
Join Date: Mar 2005
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if u want ads display on the 1st post use this code

Code:
<if condition="!$GLOBALS['FIRSTPOSTID']"> 

$spacer_open 
<div style="padding:0px 0px $stylevar[cellpadding]px 0px"> 

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> 
<tr> 
    <td class="thead" align="left">Sponsored Links</td> 
</tr> 
<tr> 
    <td class="alt1" align="center"> 
        $advert
</if> 
    </td> 
</tr> 
</table> 

</div> 
$spacer_close 

</if>
credit go to artonex for the code
https://vborg.vbsupport.ru/showthrea...t=Adsense+post
Reply With Quote
  #41  
Old 12-23-2005, 10:35 PM
Julie's Avatar
Julie Julie is offline
 
Join Date: Mar 2005
Location: Oslo, Norway
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chris M
Edit the plugin, and change:
PHP Code:
if (!in_array($vbulletin->userinfo['usergroupid'], array(567))) { 
to
PHP Code:
if (!(is_member_of($vbulletin->userinfo, array(567)))) { 
That should work

Chris
Perhaps it's changed in vB 3.5.2, because it's not working for me :S

I've altered the plugin code;

PHP Code:
if (!(is_member_of($vbulletin->userinfo, array(567162126)))) { 
Which are my not-to-see-ads-groups ... But they're still seeing ads. Like f.ex, 21 and 26 are my paid subscription groups. I've added a clone of myself, Julie2 in the subscription group, and marked the secondary group "Gold Membership", but I'm still viewing ads (when logged in as that user)...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06859 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (6)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete