• Support will be limited until May 8th, as I will be out of the office travelling. Thank you for your patience and understanding.
Status
Not open for further replies.
I need to know how you have the mod configured so that I can replicate it on my local board for testing.

I count 7 options in the XML file, can you please tell me or show me a screenshot of how you have them configured?
 
I just have it set like I show here:

Capture51.PNG

Just with the tick in the 'yes'. I have it on 'no' now as it is not working.

All other settings are blank.

Thanks.
 
To make it easier to debug I changed the plugin's code to this:
PHP:
do
{
	if (THIS_SCRIPT != 'showthread')
	{
		// Not a thread
		break;
	}

	if (!$this->registry->options['dppa_insidepost'])
	{
		// Not enabled
		break;
	}

	if (is_member_of($this->registry->userinfo, explode(',', $this->registry->options['dppa_insidepost_hidegroups'])))
	{
		// Hide group
		break;
	}

	if ($this->registry->options['dppa_insidepost_showforums'] AND !in_array($thread['forumid'], explode (',', $this->registry->options['dppa_insidepost_showforums'])))
	{
		// Wrong forum
		break;
	}

	if ($_REQUEST['p'] AND $this->post['postid'] != $_REQUEST['p'])
	{
		// Wrong post
		break;
	}

	// Set the modulo
	$post_modulus = $GLOBALS['perpage'] > 0 ? $this->post['postcount'] % $GLOBALS['perpage'] : 0;

	if ($post_modulus != 1)
	{
		// Wrong post
		break;
	}

	preg_match_all("#<br />(" . chr(13) . '|' .  chr(10) . '|' .  chr(13) . chr(10) . ")<br />#U", $this->post['message'], $matches, PREG_OFFSET_CAPTURE);
	$matches[0][] = array (1 => strlen($this->post['message']));
	$offset = $matches[0][array_rand($matches[0])][1];
	$part1 = substr($this->post['message'], 0, $offset);
	$part2 = substr($this->post['message'], $offset);
	$this->post['message'] = $part1 . "<br />\n<br />" . $this->registry->options['dppa_insidepost_html'] . $part2;
}
while (false);

if (
	$this->registry->options['dppa_afterpost'] AND 
	!is_member_of($this->registry->userinfo, explode(',', $this->registry->options['dppa_afterpost_hidegroups'])) AND 
	($this->post['postid'] == $_REQUEST['p'] OR (
		$_REQUEST['t'] AND !$_REQUEST['p'] AND $post_modulus == 1)
	)
)
{
	$template_hook['postbit_end'] = $this->registry->options['dppa_afterpost_html'];
}

Yet doing so actually made it spring to life. Can you try this code and see if it works for you?
 
To make it easier to debug I changed the plugin's code to this:
PHP:
do
{
    if (THIS_SCRIPT != 'showthread')
    {
        // Not a thread
        break;
    }

    if (!$this->registry->options['dppa_insidepost'])
    {
        // Not enabled
        break;
    }

    if (is_member_of($this->registry->userinfo, explode(',', $this->registry->options['dppa_insidepost_hidegroups'])))
    {
        // Hide group
        break;
    }

    if ($this->registry->options['dppa_insidepost_showforums'] AND !in_array($thread['forumid'], explode (',', $this->registry->options['dppa_insidepost_showforums'])))
    {
        // Wrong forum
        break;
    }

    if ($_REQUEST['p'] AND $this->post['postid'] != $_REQUEST['p'])
    {
        // Wrong post
        break;
    }

    // Set the modulo
    $post_modulus = $GLOBALS['perpage'] > 0 ? $this->post['postcount'] % $GLOBALS['perpage'] : 0;

    if ($post_modulus != 1)
    {
        // Wrong post
        break;
    }

    preg_match_all("#<br />(" . chr(13) . '|' .  chr(10) . '|' .  chr(13) . chr(10) . ")<br />#U", $this->post['message'], $matches, PREG_OFFSET_CAPTURE);
    $matches[0][] = array (1 => strlen($this->post['message']));
    $offset = $matches[0][array_rand($matches[0])][1];
    $part1 = substr($this->post['message'], 0, $offset);
    $part2 = substr($this->post['message'], $offset);
    $this->post['message'] = $part1 . "<br />\n<br />" . $this->registry->options['dppa_insidepost_html'] . $part2;
}
while (false);

if (
    $this->registry->options['dppa_afterpost'] AND 
    !is_member_of($this->registry->userinfo, explode(',', $this->registry->options['dppa_afterpost_hidegroups'])) AND 
    ($this->post['postid'] == $_REQUEST['p'] OR (
        $_REQUEST['t'] AND !$_REQUEST['p'] AND $post_modulus == 1)
    )
)
{
    $template_hook['postbit_end'] = $this->registry->options['dppa_afterpost_html'];
}

Yet doing so actually made it spring to life. Can you try this code and see if it works for you?

Before I mess up something. You mean this plugin?: Insert Inside & After Current Post
 
Having these at the top of my pages now:

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

Parse error: syntax error, unexpected $end in /home/thebull/public_html/forums/includes/class_postbit.php(345) : eval()'d code on line 469

The post thanks mod seems to be missing too.
 
That means you missed a } while copying the code.

I've attached the product to this post, you can import this and it will work :)
 

Attachments

  • product-dp_positionads_fixed.xml
    7.7 KB · Views: 1
That is awesome. Thank you so much. Just ones small issue. It now ads an ad to the second post on second, third, etc pages too. I am using another mod for some forums to always display the first post on top. Sorry for the hassle, but it never use to do this. It use to just add the ad in the first post, and it stayed there even on the other pages.
 
To be clear, do you want it to:

a) Display only on the very first post of a thread

-OR-

b) Display on the first post of every page of a thread
 
My forum cannot function without adsense revenue, and this is very high priority for me. I know you are going out of your way to help me here Fillip H. , but I really very desperately need this to work. I don't understand why this Thanks mod will not work with the default digital point mod, as without the Thanks mod it works perfectly. There must be a way to get both to work, it did before. Thank you.
 
I didn't envision this to become a several-hour project, according to our internal project management tools I have 63 hours of work to get done for Friday. I really don't have the time to recode that mod and test it with "first post on every page" mods / PMs, plus complete my work for Friday, plus my other general support duties - I won't be able to recode that mod until Saturday at the earliest =/

If they worked together before (that's not what I read out of the OP?) then what changes did you make to your forum that lead to them not working together any more? I suggest undoing those changes until I have a chance to recode the adsense mod.


Alternatively, what's wrong with using vBulletin's advertisement feature? It has First Post Content as an ad location. I really don't understand why this mod is needed.
 
I really understand that you are busy, and that this is not high priority for you. What changed was that I upgraded to vbulletin 4..2.1

That is all I can really think of. Nothing else changed.

The difference with this and default vb advertising. It inserts an ad into PM's. Made lots of money with that. Inserts ads inside posts, not just in the top right corner. Big difference in clicks. And it did not insert another add into the second posts where I use the "first post on every page" mod. So I could add another add into the last post for members.

If you say you will be able to look into everything by this weekend, I will be very happy, and I will be patient. I hope you understand my concerns though.
 
Send me a reminder PM on Saturday with a link to the first post on every page mod you use and I'll be sure to sort it out :)
 
Try this, tested to work with the FPOEP mod and in PMs.
 

Attachments

  • product-dp_positionads_fixed_for_realsies_this_time.xml
    7.8 KB · Views: 1
Status
Not open for further replies.

Legacy Advanced Post Thanks / Like

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,031
Customer rating
5.00 star(s) 1 ratings
Back
Top