Support Forum
Yellow Swordfish said
Wow - that was harsher than I was 🙂
Sorry, maybe the tone just struck me the wrong way.
I, for one, understand (and appreciate) the work that goes into a project like this. Literally thousands of hours of your own time that you have given to a project, and those who use it, for pennies on the hour (if you're lucky). Hours you could have spent with loved ones, fixing holes in your socks, or cutting your grass.
You obviously aren't in it for the money and some people just don't appreciate the hard work and dedication you've contributed to the project!
Now, had violent came back and simply stated there was a lack of understanding, instead of being demanding and trashing the software, I'm sure my reply would have been a little more cordial.
Again, sorry - to everyone, violent23 included - if I went a tad overboard!
I'll go a step further! If you install the ad injection plugin and tell me what SP theme you're using I'll add the code and attach it to a post so that you can upload it to your server.
Dave H said
I'll tell you what I do as an example...
I use the Ad Injection plugin for WP. It automatically inserts ads into posts and pages based on criteria and positions that you set, but it also gives you code that you can insert anywhere. So I insert the code for random ads - if (function_exists('adinj_print_ad')){adinj_print_ad('random'); } - in the spTopicView.php file directly before the post loop. This gives me an ad at the top of each topic.
That's a great tip Dave. I use a similar random ad WP plugin. I was thinking about creating a new function to display ads or any other info but using your tip I can use the ad plugin instead. Since the ad plugin will put in anything you create it could be an advertisement or any other text/problem-with-post-edit-buttontml I want.
violent23 said
I was looking at the wiki and it says to use hooks that are located here "simple-forum/forum/problem-with-post-edit-buttonooks/sf-hook-template.txt" this does not exist in 5.0. Where are the hooks, and how do I put advertisements in Simple Press?
Here is how I include Google Adsense into Simple Press 5.0. May not be the most efficient way, but it works and I feel it is non-obtrusive. I have no idea what the other WP plug-in is. Just like to pop the Adsense right into the HTML. I have attached what mine looks like.
1. Go find the templates directory. I am using the Default theme. It is in the sp-resources directory. Mine is /wp-content/sp-resources/forum-themes/default/templates
2. You will be editing the spHead.php file. Load that up.
3. Under the 'Start the userInfo section' look for the line that says sp_LastVisitLabel
4. My code now looks like this (with my adsense account number x'd out)
sp_LastVisitLabel('tagClass=spLabelSmall spRight', __sp('<table width=468><tr><td align=right>Last visited %LASTVISIT% <br /><br /><br /> <script type="text/javascript"><!--
google_ad_client = "ca-pub-01234567890123";
/* TOP_RIGHT_JUNKS2012 */
google_ad_slot = "0123456789";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td></tr></table>'));
The result is this:
You can view it at http://junks.tv/message-board/.....reen-room/
The original code line for the above change was this:
sp_LastVisitLabel('tagClass=spLabelSmall spRight', __sp('Last visited %LASTVISIT%'));
Sorry, I should have included that in my reply. Just make sure you paste your Google Adsense code BEFORE the closing quote. Anything in the quotes can be standard HTML ... like the Google Adsense code.
yup. the theme is really just php code which generates html... so including it directly in the theme is perfectly fine and simple...
of course, that does require you to make the theme your own and potentially miss some updates, but no different than a wp theme...
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
yup. the theme is really just php code which generates html... so including it directly in the theme is perfectly fine and simple...
of course, that does require you to make the theme your own and potentially miss some updates, but no different than a wp theme...
Yeah, if there are any updates to the theme I have to remind myself to go add this code in later. Hopefully when more documentation comes out using Functions, etc I can do something more direct.
understand. lots of actions and filters for you to use, but you are right documentation is just beginning to be populated on our code at http://codex.simple-press.com
could always use a hand populating it!
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
understand. lots of actions and filters for you to use, but you are right documentation is just beginning to be populated on our code at http://codex.simple-press.com
could always use a hand populating it!
I would help if I knew more of what I was doing. Not a php programmer at all. I do lots of trial and error. Sorry.
1 Guest(s)