Support Forum
you can just stick it in the template file for the sp theme you are using, checking for $spTopicView->current_post==1, after the inner post loop...
right after these
sp_InsertBreak();
sp_SectionEnd('', 'post');
just use the php echo statement to output the adsense code... you might want to style it...
as always, we recommend you make your own sp theme before editing ours to prevent losing changes on upgrade... http://codex.simple-press.com/.....g-a-theme/
Visit Cruise Talk Central and Mr Papa's World
Thanks for that. There are a couple of other locations that I need to know about too.
I am using the Social Connect plugin and want to include it's code in the login for Simple:Press. What is the location in the code to include it between the password and Login button, after clicking on Login to display these fields.
I also want to include some social networking buttons on each topic. This would need to go at the bottom of each topic post and reply.
I look forward to your reply, so I can start inserting some code in a custom template.
Thanks
Paul
If you take a look at the template files and compare them to the display of the forum it really is pretty easy to work out the structure. Each display element simply has it's own function and you can add standard php and html code anywhere you like. Just echo the output.
YELLOW
SWORDFISH
|
I'm really new at this whole PHP thing... what is meant by an echo?
For example, I want to place a 728x90 Adsense ad below the first post of the forum, and under it (before the forum information section). I see the locations as to where to put it, from previous forum posts as well as this one, but I'm not familiar with how to "echo" it. I was placing the code there, and it was returning errors on the page.
Any help would be appreciated. A template of it would be so amazing, but It's not "expected" or anything. Thank you!
Here is how you can do it.
First create your own theme so any changes you make are not over written by updates. See here on how.
http://codex.simple-press.com/.....g-a-theme/
Since you want to use the adsense code in multiple paces I would create a function for it.
It appears you have seen the files in yourthemes/template folder. One of the is spFunctions.php. This is a file that you can add a function to, among other things, that your theme can use.
Create a function for your ad. Let's call it spAddCode
Open the spFuntions.php file up in your editor and at the bottom just above the closing ?> is where you can add the function.
Your function should look something like this.
function spAddCode() {
class="brush-php syntax">spAddCode();
Hi,
Thanks for the above information.
I have successfully implemented Adsense in the spHead.php
I now also want an add below the very first post of any topic. I know the code I need to place, but I am looking everywhere for:
Mr Papa said
checking for $spTopicView->current_post==1, after the inner post loop...right after these
sp_InsertBreak();
sp_SectionEnd('', 'post');
In which .php file will I find this bit of code so that I can echo my adsense code? I have checked spTopicView.php as well as several others.
Thank you,
JG
1 Guest(s)