vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - The second post is advertising (https://vborg.vbsupport.ru/showthread.php?t=239981)

BadgerDog 03-28-2011 12:18 PM

Quote:

Originally Posted by Asterix_ita (Post 2178291)
from my point of view is correct to not distinguish between primary and secondary groups

If I decide that the components of the group “A” are excluded, they must be excluded independent primary or secondary group

Regards
Asterix

Could be, but in our opinion and the way most add-mods that we currently use treat UserGroup inclusion or exclusion, is when you select a group to exclude, it should not also require the us to select ALL other secondary groups that may be involved. The one selection should suffice.

For example, I want to exclude Admins, but with this mod, unless I also exclude other secondary UserGroups that Admins belong to, then the result of just excluding anyone belonging to the single Admin usergroup on its own is pointless and it doesn't work because the mod wants ALL of them checked or unchecked. ;)

Many sites use secondary usergroups to identify things like contributing members etc, so their use that way conflicts with how this mod is coded.

Anyway, again... nice effort on behalf of the coder and we appreciate his work, but for us it won't work without a more traditional approach to handling user group exclusions.

Regards,
Doug

Asterix_ita 03-28-2011 12:55 PM

Hello

maybe I did not understand the problem, due to my bad English

Quote:

it should not also require the us to select ALL other secondary groups that may be involved
does not require the selection of others.

I have excluded the admin group.
my account have as primary group admin
as secondary staff (not excluded)

and the ads do not see


I have change excluded staff group
my account have as primary group admin (not excluded)
as secondary staff

and the ads do not see it properly


the instruction I used to check the group is as follows:

Code:

if (is_member_of($this->registry->userinfo,$ctads['groups'])) {
I feel the same used in other addon, I can signal an addon that verifies


thanks

BadgerDog 03-28-2011 01:47 PM

Quote:

Originally Posted by Asterix_ita (Post 2178309)
I have excluded the admin group.
my account have as primary group admin
as secondary staff (not excluded)

and the ads do not see

My apologies as I only speak English, but let's try this ...

You have an option that says:

Select the Usergroup to be excluded from ads second post.

If I check ALL the boxes but NOT the one that says Administrator, then according to your option, the Administrator group ONLY should be able to view the ads.

On our site, any member who belongs to the group Administrator DOES NOT SEE ads. They do not see ads because an Administrator on our site also belongs to other user groups as well, which are checked. So, because those other user groups are checked and kind of process logic you're using, it just doesn't work for us...

Thanks for your efforts ... :)

Rergards,
Doug

Asterix_ita 03-28-2011 02:11 PM

Quote:

If I check ALL the boxes but NOT the one that says Administrator, then according to your option, the Administrator group ONLY should be able to view the ads.
certainly, if the administrator is not covered by other groups with the restriction, the addon follow the stricter rules

in your case probably should create a group no-ads, exclude this, and assigned to admin the secondary group no-ads

BadgerDog 03-28-2011 02:28 PM

Quote:

Originally Posted by Asterix_ita (Post 2178338)
in your case probably should create a group no-ads, exclude this, and assigned to admin the secondary group no-ads

It would be easier to have the check box group option changed to be:

Select the Usergroup to be INCLUDED (permitted) to view ads second post.

Then, only members belonging to whatever usergroup is checked would see the ads.

Solves the problem for us ... ;)

Regards,
Doug

Asterix_ita 03-28-2011 03:55 PM

hi
should be sufficient to make this

admincp ->Plugins & Products ->Plugin Manager search Second Post ADS (press edit)

seach this code

Code:

             
 if (is_member_of($this->registry->userinfo,$ctads['groups']))
                {
                    $ctads['ok'] = false;
                }

change to

Code:

             
 if (!is_member_of($this->registry->userinfo,$ctads['groups']))
                {
                    $ctads['ok'] = false;
                }

Search this phrase
  • $vbphrase[setting_ads_ct_groups_title] on english traslate set: Select the Usergroup to be INCLUDED (permitted)
  • $vbphrase[setting_ads_ct_groups_desc] on english traslate set: only groups check show the second post ads

let me know if it works

Regards,

Asterix

DigitalDark 03-28-2011 04:58 PM

Quote:

Originally Posted by DigitalDark (Post 2177655)
Hi! First of all, thanks for this great mod!

I've a question. It's possible to change the situation of the ads post?

I would like to change before the 1st Post instead after 1st post.
It's possible? What code I've to change?

Thank you!

Thanks

Any one? Thank you

Asterix_ita 03-28-2011 05:13 PM

hi

I checked quickly, your request requires the variation of one plugin and one or two template

admincp ->Plugins & Products ->Plugin Manager search Second Post ADS (press edit)

seach this code

Code:

if ($ctads['ok'] && $ctads['template'] == 0)
                {
                    $templater = vB_Template::create('postbit_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $template_hook['postbit_end'] .= $templater->render(); 
                }
                if ($ctads['ok'] && $ctads['template'] == 1)
                {
                $templater = vB_Template::create('postbit_legacy_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $template_hook['postbit_end'] .= $templater->render();
                }

replace with
Code:

if ($ctads['ok'] && $ctads['template'] == 0)
                {
                    $templater = vB_Template::create('postbit_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $ctads['template'] .= $templater->render(); 
                }
                if ($ctads['ok'] && $ctads['template'] == 1)
                {
                $templater = vB_Template::create('postbit_legacy_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $ctads['template'] .= $templater->render();
                }

vB_Template::preRegister('postbit',array('ctads' => $ctads));
vB_Template::preRegister('postbit_legacy',array('ctads' => $ctads));

Search postbit or postbit_legacy template and add on top this {vb:raw ctads.template}

I have not tested but should work

Regards
Asterix

DigitalDark 03-28-2011 05:21 PM

Nice, nice nice!! Worked.

This will help a lot, because the human eye looks first at the first content in the screen.

Thank you!

PD: It's appearing "0 0 0" before the ads

example

BadgerDog 03-28-2011 06:08 PM

Quote:

Originally Posted by Asterix_ita (Post 2178398)
let me know if it works

Regards,

Asterix

Worked perfect .... :up:

Ads ONLY appear for selected usergroup membership.

Thank you very much for the customization ....

Can I assume the Forum Exclude can be reversed in a similar way?

Regards,
Doug

Asterix_ita 03-28-2011 06:30 PM

Quote:

Originally Posted by BadgerDog (Post 2178472)
Can I assume the Forum Exclude can be reversed in a similar way?

Yes, it is similar.

Asterix_ita 03-28-2011 07:06 PM

@Digital

sorry my mistake, try this

admincp ->Plugins & Products ->Plugin Manager search Second Post ADS (press edit)

seach this code

Code:

if ($ctads['ok'] && $ctads['template'] == 0)
                {
                    $templater = vB_Template::create('postbit_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $template_hook['postbit_end'] .= $templater->render(); 
                }
                if ($ctads['ok'] && $ctads['template'] == 1)
                {
                $templater = vB_Template::create('postbit_legacy_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $template_hook['postbit_end'] .= $templater->render();
                }

replace with
Code:

if ($ctads['ok'] && $ctads['template'] == 0)
                {
                    $templater = vB_Template::create('postbit_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $ctads['template1'] = $templater->render(); 
                }
                if ($ctads['ok'] && $ctads['template'] == 1)
                {
                $templater = vB_Template::create('postbit_legacy_ads_ct_2th');
                    $templater->register('post', $post);
                    $templater->register('ctads', $ctads);
                    $ctads['template1'] = $templater->render();
                }

vB_Template::preRegister('postbit',array('ctads' => $ctads));
vB_Template::preRegister('postbit_legacy',array('ctads' => $ctads));

Search postbit or postbit_legacy template and add on top this {vb:raw ctads.template1}

BadgerDog 03-29-2011 10:21 AM

Quote:

Originally Posted by Asterix_ita (Post 2178482)
Yes, it is similar.

Thanks .. :)

So, I changed this:

Code:

if (in_array($thread['forumid'],$ctads['forums']))
                                {
                                        $ctads['ok'] = false;
                                }

to this:

Code:

if (!in_array($thread['forumid'],$ctads['forums']))
                                {
                                        $ctads['ok'] = false;
                                }

... which should make the mod only INCLUDE any forums checked in either place?

Thanks ..

Regards,
Doug

Asterix_ita 03-29-2011 10:52 AM

the change applied says: in all forums that are not reported here denies viewing

I sincerely leave ads in all forums and select the excluded, that variable should act on the second ads.

Warning:

All the plugin code is linked and changing one part may create problems in other options

BadgerDog 04-17-2011 04:03 PM

Here's an odd request, but feedback with advice from anyone would be appreciated ... :up:

If I wanted to execute the following conditional so that this excellent mod ONLY displayed the ads on the second post under those conditions specified, where in the plugins would I put it? I've tried everywhere including the template and it always seems to still interact with the mod's own settings, or prevents elements of the postbit_legacy bottom bar from displaying properly.

Code:

<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,13,17) || in_array($bbuserinfo['userid'],array(2,5539))">

Execute Ads in Second Post Mod

</vb:if>

Would appreciate any advice ... :)

Regards,
Doug

Asterix_ita 04-18-2011 04:47 AM

Hi

you could try changing the plugin "Second Post ADS, in it there are all conditions

or set no exclusion in the options plugin and act in templates postbit_legacy_ads_ct_2th or postbit_ads_ct_2th

Regards

Asterix

BadgerDog 04-18-2011 09:47 AM

Quote:

Originally Posted by Asterix_ita (Post 2185851)
Hi

you could try changing the plugin "Second Post ADS, in it there are all conditions

or set no exclusion in the options plugin and act in templates postbit_legacy_ads_ct_2th or postbit_ads_ct_2th

Regards

Asterix

Thank you Sir .. :)

I did try all those without any success.....

I have added a new usergroup which combined with the customization for "including" usergroups you kindly gave me earlier, I think will work. Still have to test it though.

Nice mod.... do you do paid customization work on this for a fee?

Regards,
Doug

Ricsca 04-23-2011 09:50 AM

How can you place the ad under the first post and sottol'ultimo post?

Asterix_ita 04-24-2011 05:41 AM

Hi Ricsca

should be sufficient to change the template or postbit_ads_ct_2th postbit_legacy_ads_ct_2th

find

Code:

                <vb:if condition="$post[postcount] % $vboptions[maxposts] == 1">
Replace with

Code:

                <vb:if condition="$post[postcount] % $vboptions[maxposts] == 1 || $post[islastshown]">
let me know

Regards

Asterix

sticky 07-10-2011 04:18 AM

Can I have different ads in different forums for the second post?

For example, forum A has ad X as second post and forum B has ad Y as second post?

Asterix_ita 07-10-2011 11:58 AM

Sorry but the request requires a completely different structure, at the moment you can only have two ads.

maneri 07-11-2011 08:33 PM

Hi Asterix:

First, thanks for the mod.

I would like to set $post[islastshown] as in post 139, is it posible to show $post[islastshown] just in case of thread with more than 5 replies ?

I mean, I do not want a thread with just 3 answers and 2 ads, I would like to set the minimum of 5 answers in order the last ad, included in $post[islastshown], to be shown.

Grazie!

Asterix_ita 07-19-2011 05:17 PM

Hi

change template postbit or postbit_legacy

find:

Code:

<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1">
replace with:

Code:

<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1  || ($post[postcount] % $vboptions[maxposts] >= 5 AND  $post[islastshown])">
for Italian users is possible see other options here

regards

paolpepas 07-23-2011 06:49 AM

Hello, I added ADS so long time in some sections.
Now I would like to place an ADS in a new section, keeping even the old ADS.
It's possible?

If I set “yes” in the “Activate the second Ads”
The old ads will disappear and only see the new.
Thank’s

I use the version 2.0.6

Asterix_ita 07-23-2011 06:59 AM

you can only see one AD for section, you can choose between two scripts, but only one is visible

paolpepas 07-23-2011 07:35 AM

Quote:

Originally Posted by Asterix_ita (Post 2223817)
you can only see one AD for section, you can choose between two scripts, but only one is visible


Ok thank's ;)

maneri 07-25-2011 10:13 AM

Quote:

Originally Posted by Asterix_ita (Post 2222494)
find:
Code:

<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1">
replace with:

Code:

<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1  || ($post[postcount] % $vboptions[maxposts] >= 5 AND  $post[islastshown])">

Hi Asterix_ita,

Thanks so much for your answer!

RedPoint 07-26-2011 06:16 AM

Hi and thanks for the wonderfull mod.
I use for all my sites a central adserver, the OpenX and this mod dont show the openX banners, the code from openX is:

Quote:

<script type='text/javascript'><!--// <![CDATA[
OA_show(5);
// ]]> --></script>
Any idea for this possibility to run openX banners in this mod?

Asterix_ita 07-26-2011 10:38 AM

I do not know the circuit and I can not do the tests

I suggest trying the following code

Code:

<script type='text/javascript'>
OA_show(5);
</script>


Taurus1 07-26-2011 01:46 PM

1 Attachment(s)
Awesome mod! Thank you very much. I would like to remove the following parts please:

Attachment 131402

Is it possible?

Thank you!

EDIT: I would also like to bring the ad inside the post a bit down please. It is right at the top. Is it possible to have it completely in the center. From left to right and bottom to top. Thanks.

EDIT AGAIN: Sorry, disregard the above. I managed to get it done myself. Thanks again!

Attachment 131403

RedPoint 07-26-2011 02:20 PM

Quote:

Originally Posted by Asterix_ita (Post 2225130)
I do not know the circuit and I can not do the tests

I suggest trying the following code

Code:

<script type='text/javascript'>
OA_show(5);
</script>


dont work for me :(

Asterix_ita 07-26-2011 04:33 PM

I'm sorry but I do not know the circuit, I could return the entire code that currently uses to insert the ads in vbulletin

In this way I can try to my test vbulletin

Thanks

MalluParadise 10-23-2011 11:38 PM

is this working in 4.1.7 ?

sticky 10-24-2011 07:03 AM

This really is a great mod. The only thing missing is the ability to have a different second post add in every forum.

For example, Add X in Forum X. Add Y in Forum Y. Add Z in Forum Z.

sticky 10-24-2011 07:09 AM

Does not work right with 4.1.7... needs to be updated.

Asterix_ita 10-24-2011 03:03 PM

On my test forum the addon works fine with vbulletin 4.1.7

Regards

sticky 10-24-2011 11:16 PM

Quote:

Originally Posted by Asterix_ita (Post 2261011)
On my test forum the addon works fine with vbulletin 4.1.7

Regards

Then looks like I have a conflict with another mod, wish I knew what it was.

Iquote for example doesn't work for me with it...

Asterix_ita 10-25-2011 05:58 AM

Quote:

Iquote for example doesn't work for me with it...
I have seen no conflicts with other mods, but so are many
you can try to disable or remove my addon and see if iquote works on 4.1.7

regards

sticky 10-25-2011 08:12 AM

Quote:

Originally Posted by Asterix_ita (Post 2261319)
I have seen no conflicts with other mods, but so are many
you can try to disable or remove my addon and see if iquote works on 4.1.7

regards

Yes, once I disabled this mod everything worked as it should.

prado.boris 11-13-2011 07:31 PM

Great Plugin!!

I have some questions

1. Can you change the avater for a ad?

2. Any advise of how to add the ad to the last post?

You can see the example of what i need to do in this url: http://anabolicminds.com/forum/suppl...e-anabeta.html

Look the second and last post (the avatar is a ad)


All times are GMT. The time now is 03:12 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.02342 seconds
  • Memory Usage 1,864KB
  • 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
  • (18)bbcode_code_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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