vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Randomly positioned ad in between postbits in showthread (https://vborg.vbsupport.ru/showthread.php?t=98057)

imported_infitech 04-14-2006 05:36 AM

This stretches my page

Niall Fernie 04-14-2006 02:38 PM

Now that I have this up and running, can anyone tell me how to modify the first line condition to check for user rank, ie I would also like my Junior members to be able to see the ads. I already have it checking for forums and usergroups. Junior members (less than 30 posts) dont contribute as much content to the site as more senior members so they may as well see the ads.

Thanks in advance for any help.

The Chief 04-16-2006 05:33 AM

Does this work on postbit template, doesn't seem to work on mine, it creates the first post normal, then every post after that just decreases in size, lol..

the last post is super small..??

AzzidReign 04-16-2006 05:47 AM

Sweet! I've been looking for this! Thanks a lot!

I had some troubles, but once I put the code in both postbit and legacy, then the ads started showing up! Brilliant mod! Thanks very much!

UK Jimbo 04-21-2006 09:38 AM

Quote:

Originally Posted by imported_infitech
This stretches my page

Nice forum style - doesn't look very standard to me though.

You probably need to change the HTML accordingly :)

UK Jimbo 04-21-2006 09:41 AM

Quote:

Originally Posted by The Chief
Does this work on postbit template, doesn't seem to work on mine, it creates the first post normal, then every post after that just decreases in size, lol..

the last post is super small..??

Is your postbit standard? Are you sure you pasted the code in correctly.

Without more info it's impossible to speculate what might be wrong.

UK Jimbo 04-21-2006 09:57 AM

Quote:

Originally Posted by arossphoto
I've installed and it's working very well. Will the code above display the ads after the first post and before the last? Would you mind showing me what the whole code for the post bit would look like, and is it possible to show the ads to certain usergroups?

Cheers.

The postbit code should remain the same.

If you look back through the thread you'll see information on how to restrict the ad to appear/hide for given user groups.

Shout if you get stuck.

UK Jimbo 04-21-2006 10:03 AM

Quote:

Originally Posted by sandrodz
installed, works like charm... only concern is if I can set it to display at the end of the last post only? or after the first post only? cause I believe this kind of random placing isn't efficient in my case... thank you!

Trawl back through the thread. Pretty sure this has been done too :)

imported_infitech 04-21-2006 10:24 AM

Thnks UK Jimbo. Already have.

UK Jimbo 04-21-2006 11:43 AM

Quote:

Originally Posted by imported_infitech
Thnks UK Jimbo. Already have.

You should click install then ;)

arossphoto 05-14-2006 10:12 PM

Quote:

Originally Posted by UK Jimbo
To limit it just to certain user groups I'd recommend the following conditional rather than the in_array() solution posted above. This version ensures that secondary group assignments are checked too.

For a single user group (1 in this case)
PHP Code:

<if condition="is_member_of($bbuserinfo, 1)"

For multiple user groups (1, 2 & 3 in this case)
PHP Code:

<if condition="is_member_of($bbuserinfo, array(1,2,3))"


I only have one usergroup that I don't want to see the ads. Instead of entering all the groups that should see them like the example above, is there a way to just enter the usergroup that should not see them?

I hope that makes sense.

Thanks.

UK Jimbo 05-14-2006 10:59 PM

Quote:

Originally Posted by arossphoto
I only have one usergroup that I don't want to see the ads. Instead of entering all the groups that should see them like the example above, is there a way to just enter the usergroup that should not see them?

I hope that makes sense.

Thanks.

I think it was done on this thread somewhere before you can negate it like this:

PHP Code:

<if condition="! is_member_of($bbuserinfo, 1)"


arossphoto 05-15-2006 12:00 AM

Thanks! Works perfectly. I did search here before I asked, but not much came up under "usergroup".

veedee 05-15-2006 03:39 PM

Awesome hack. I've donated $25, as it's made me at least $500 so far, what about you?

arossphoto 05-19-2006 10:59 PM

Quote:

Originally Posted by Doc Great
I did (it again :D) --> a little modification to show all guests Ad, but let the reg. users choose if they want to get ad-posts or not.

Is there any way to provide this option only to certain usergroups, like paying members?

UK Jimbo 05-21-2006 08:42 PM

Quote:

Originally Posted by arossphoto
Is there any way to provide this option only to certain usergroups, like paying members?

Yup - the question's been asked/answered a few times in this thread already :)

arossphoto 05-21-2006 09:15 PM

Quote:

Originally Posted by UK Jimbo
Yup - the question's been asked/answered a few times in this thread already :)

Sorry, I don't think I was being very clear in my question. Doc Great provided a solution that would add an On/Off button to the user's control panel so they could choose to see ads or not. Maybe this isn't the right place to ask, but I'd only like to give this option to certain paying members.

With your help I have set it up already so one usergroup never sees the ads, but I would like to give them the option in the Control Panel to turn ads on or off. I think I read all the posts here and I didn't see this answered.

Cheers,

Andrew

UK Jimbo 05-21-2006 09:34 PM

If you could create the userfield and have it specific to only certain usergroups that would solve the problem. I'm not sure if vBulletin will do that out of the box (the docs will do though!), if not I think it's probably a question for the mod requests forum on here.

Post back to let me/others know how you got on. Thanks!

T.S. 05-23-2006 05:48 AM

Great plugin, thanks. Now if only there was one to put an ad randomly between threads on the thread list. ;)

durapuma 05-23-2006 04:51 PM

Hello,

is it possible, that this mod does not work in vB 3.5.4 ? I have just changed the postbit template, I have add the following at the bottom :

Quote:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$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">Sponsoren</td>
</tr>
<tr>
<td class="alt1" align="center">
<!-- Werbung Start -->
<script type="text/javascript"><!--
google_ad_client = "pub-4639893886504387";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Werbung Ende -->

</td>
</tr>
</table>

</div>
$spacer_close
</if>
after that, I import the Plugin. But nothing happens :(

What is the problem ? What do you need to help me ?


Best Regards from Germany

durapuma

UK Jimbo 05-23-2006 05:06 PM

If you're running in "legacy postbit" mode (user info goes at the left hand side of posts) then you need to edit the template postbit_legacy instead of postbit.

You also haven't clicked install for this mod :)

durapuma 05-23-2006 07:22 PM

Hello again,

i have just restore the "postbit" template and have add the code to the postbit_lecacy template. But it don't run :(

Whats the problem :( :( ?

I will click on install, if it runs ;)

dssart 05-23-2006 07:53 PM

Just wanted to say that this was an excellent hack. Clicked Install. Now, if it generates some cash I'd be happy to donate a little :)

One newbie type question that has me stumped. I want to make the ads visible to non-registered guests, Users awaiting EMail confirmation and to those who have a post total of less than 50. I know this really goes beyond the realm of this hack, but if anyone can clarify this I would be grateful. For some reason I can't grasp this and I'm sure it super-simple.

Here are my default usergroups and their Usergroup I.D.s:

(COPPA)-4
Administrators-6
Moderators-7
Registered-2
Super Moderators-5
Unregistered-1
Users Awaiting EMail Confirmation-3


Now here are my Usergroup Titles/Minimum Posts/I.D. #

New Member/0/1
Junior Member/20/2
Member/50/3
Senior Member/100/4


How can I edit the hack so that after a minimum post requirement a user can be "ad-free"?


Thanks!

Stop 05-23-2006 10:27 PM

Great hack & works fine.
Thanks Jimbo

T.S. 05-23-2006 11:46 PM

Quote:

Originally Posted by dssart
Just wanted to say that this was an excellent hack. Clicked Install. Now, if it generates some cash I'd be happy to donate a little :)

One newbie type question that has me stumped. I want to make the ads visible to non-registered guests, Users awaiting EMail confirmation and to those who have a post total of less than 50. I know this really goes beyond the realm of this hack, but if anyone can clarify this I would be grateful. For some reason I can't grasp this and I'm sure it super-simple.

Here are my default usergroups and their Usergroup I.D.s:

(COPPA)-4
Administrators-6
Moderators-7
Registered-2
Super Moderators-5
Unregistered-1
Users Awaiting EMail Confirmation-3


Now here are my Usergroup Titles/Minimum Posts/I.D. #

New Member/0/1
Junior Member/20/2
Member/50/3
Senior Member/100/4


How can I edit the hack so that after a minimum post requirement a user can be "ad-free"?


Thanks!

I believe this would be done by adding a new usergroup and having users automatically promoted to it after 50 posts, then using the "if" by usergroup as explained earlier in the thread. Unless an "if" can be done by postcount, I am not sure. ;)

dssart 05-24-2006 12:06 AM

Thanks T.S., I would ideally like to keep my usergroups/usertitles and have this handled by a conditional if possible..but if that can't de done, I'll try anything.

T.S. 05-24-2006 12:14 AM

Quote:

Originally Posted by dssart
Thanks T.S., I would ideally like to keep my usergroups/usertitles and have this handled by a conditional if possible..but if that can't de done, I'll try anything.

Try this
Code:

<if condition="$post[posts] >=50">

Jimbo's code

</if>


dssart 05-24-2006 12:17 AM

Thanks T.S.!

The first "if" line would go before Jimbo's first line of code in his hack and the last would go after his last line correct?

T.S. 05-24-2006 12:19 AM

Quote:

Originally Posted by dssart
Thanks T.S.!

The first "if" line would go before Jimbo's first line of code in his hack and the last would go after his last line correct?

Correct.

dssart 05-24-2006 12:20 AM

Thanks again..I'll give it a go tomorrow after I get home from my real job :)

durapuma 05-24-2006 04:41 AM

Quote:

Originally Posted by durapuma
Hello again,

i have just restore the "postbit" template and have add the code to the postbit_lecacy template. But it don't run :(

Whats the problem :( :( ?

I will click on install, if it runs ;)

Please remember my question - i need to install the hack quickly!!

Thanks

.Tim 05-26-2006 10:26 PM

Works perfect! Thanks.

dssart 05-28-2006 04:08 AM

Doesn't work. Thanks anyways...



Quote:

Originally Posted by T.S.
Try this
Code:

<if condition="$post[posts] >=50">

Jimbo's code

</if>



T.S. 05-28-2006 05:12 AM

Quote:

Originally Posted by dssart
Doesn't work. Thanks anyways...

I just noticed that I placed the < the wrong way. I turned it around and tried it on my own forum, but still couldn't get it working. I am still learning.

sross 05-31-2006 12:24 AM

Hi, so is the ad displayed right after the 1st post on the page? I would like it to do the following.. is this possible:

a page has 2 posts the ad appears after post one, the page has 4 posts the ad appears after post2, page with 10 posts on it the ad appears after post5. This way the ad is always kept in the center of the postings. Thanks for any info!

T.S. 05-31-2006 07:23 AM

Quote:

Originally Posted by sross
Hi, so is the ad displayed right after the 1st post on the page?

This plugin displays the ad in a different random position with each page load.

UK Jimbo 05-31-2006 10:04 AM

Quote:

Originally Posted by sross
Hi, so is the ad displayed right after the 1st post on the page? I would like it to do the following.. is this possible:

a page has 2 posts the ad appears after post one, the page has 4 posts the ad appears after post2, page with 10 posts on it the ad appears after post5. This way the ad is always kept in the center of the postings. Thanks for any info!

I could write this for you. Drop me a PM with an idea of how much you're willing to spend on it.

Netdesignz 06-09-2006 08:47 AM

Sorry to sound dumb and ask this question but after reading through this whole thread im still confused.
This is the first mod ive installed so please bear with me.

Ive manged uploading the xml :)

But this edit the postbit is baffling me as i cant find the file i need to edit. Ive looked through all the files i have there and there is no file called that..Can someone explain in noob terms plz :(

UK Jimbo 06-09-2006 09:05 AM

"postbit" and "postbit_legacy" are the name of "templates". Sets of "templates" are stored in "styles".

Check out the "styles & templates" section in the vB documentation here

Shout if you have any problems.

T.S. 06-19-2006 11:23 AM

Any 3.6 update coming out? This version works for me on 3.6 but doesn't quite look right. :banana:


All times are GMT. The time now is 12:40 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.01499 seconds
  • Memory Usage 1,840KB
  • 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
  • (3)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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