MyBB Community Forums

Full Version: cpmfetch on my forum side
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
fixed
You can't put PHP in templates.

Try my plugin - http://mods.mybb.com/view/cpmfetch-rando...s-on-index

You can edit the plugin to show last added instead of random images if that's what you prefer.

And as you can see on Pet Forums, I've edited it myself to fit in the sidebar.
Hi there,

Honestly i got the idea afer browsing the themes and saw your forum (Live Demonstration). I've already installed your plugin but the random images appear at the bottom of the site. Id like to place it on the right part like your site , also a facebook fanpage.

I'm not sure if you're going to like it , but i want something like yours = (

So how do i put it in the right part or left part of the site ?

Tyvm Sir
Presuming the plugin is already installed...

In cpmfetch.php find:
$objCpm->cpm_viewRandomMediaFrom("",1, 4, $options);

Replace with:
$objCpm->cpm_viewRandomMediaFrom("",4, 1, $options);

In the index template find:
{$header}
{$forums}
{$cpmfetch}
{$boardstats}

Replace with:
{$header}
<div class="sidebar" style="float:right; width:25%;">
{$cpmfetch}
</div>
<div class="forums" style="float:left; width:75%;">
{$forums}
{$boardstats}
</div>

You might have to play around with the widths to make it work.
Thanks so much i got it working!

How do i add a seperate box for picture of the month , my forum is about bodybuilding here in philippines , i hope you dont mind im a copy cat.

1st Box Picture of the Month
2nd Box Facebok Fanpage
3rd Box Cpmfetch Photos

do i need to install plugins for picture of the month and fanpage ?

thank you so much
For the picture of the month you can do this
where you have
<div class="sidebar" style="float:right; width:25%;">
{$cpmfetch}
</div>
add in there something like
<table border="0" cellspacing="0" cellpadding="5" class="tborder">
<tbody><tr>
<td class="thead">
<strong>title</strong></td>
</tr>
<tr>
<td class="trow1" align="center">
<span class="smalltext"><strong>text/strong></span>
<div align="center"><img src="" alt=""></div>
<div align="center">your text</div>
</td>
</tr>
</tbody></table>
where you want it to appear.
great done ..

what about the facebook and statistics box
Something like this:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead">
<strong><a href="http://www.facebook.com/YOURFACEBOOKPAGE" target="_blank" rel="nofollow">Like us on Facebook</a></strong></td>
</tr>
</table>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/YOURFACEBOOKPAGE" width="238" connections="8" stream="false" header="false"></fb:like-box>
<br />

For the stats box, just move {$boardstats} into the sidebar div, you might also have to edit the templates to make it look right (depending on your theme).
thanks i got it all working , how do i add spaces between the boxes..


tyvm
Add a break where required:
<br />
Pages: 1 2