News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Wordpress AdRotate Plugin Intergration with SMF

Started by apexadllc, November 30, 2012, 06:54:40 PM

Previous topic - Next topic

apexadllc

I have a new SMF forum that I just installed.  I am wanting to pull my ad system from my Wordpress site over in to the header of my Simple Portal block I created.  The Simple Portal blocks offer custom HTML and custom PHP options.  I am thinking the custom PHP option is the way I want to go as I have the function call to reference my ad plugin on Wordpress.  It is as follows:

echo adrotate_ad('2');

I am not sure what code I need to add to SMF, or my SMF theme to reference the wordpress plugin.  The forum is installed on a subdomain / folder of the wordpress site and uses a different database. 

Here are several articles I found but it doesn't make sense. 

From Ad rotate plugin: http://forum.adrotateplugin.com/Thread-175-code-for-subdomain-for-clicking-tracking-impressions?highlight=folder

From Wordpress referencing the Ad rotate plugin comment above: http://codex.wordpress.org/Integrating_WordPress_with_Your_Website

Any help is greatly appreciate!
Thank you


apexadllc

Is anyone able to help with this or have any knowledge on pulling a wordpress plugin to a different folder?

ApplianceJunk

Why bother when there are already ad mods for SMF.


apexadllc

The adrotate plugin I have setup through wordpress tracks the number of clicks etc from that source.  So I'd like to just pull it in to the top of my forum so I can track it all in one spot so I don't have to monitor two different ad systems.  And when I upload ads on my wordpress site, they'll be updated on the forum as well. 

apexadllc

After reading through countless posts I came across a bit of information that I tried, but it's not working properly... This was to show latest posts within your SMF forum.

It referenced starting with this code: 

require('/path/to/your/blog/wp-load.php');


Then adding this code:

$recent_posts = get_posts(array('numberposts' => 3));

foreach ($recent_posts as $post)
{
        echo '<a href="' . $post->guid . '">' . $post->post_title . '</a><br />';
}

I tried that in a portal block via custom php to see if it would work at least.  I can save out the code in a custom php block, but it doesn't appear when you visit the front side of the forum. Obvioulsy, I don't want the posts to show, I want to pull my plugin from Wordpress instead.  My question now, is there a specific reason this wouldn't work on my forum as it worked on someone elses? 

Am I on the right track here for pulling the plugin in?  This seems like it shouldn't be that difficult...

Advertisement: