Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Advertise
Avatar
Alan Newman
Member
Free Members
sp_UserOfflineSmall Offline
Feb 13, 2015 - 3:06 pm

Hi 

On smartphones it's only really possible to see adverts in the header as sidebars aren't really visible. Is there anyway to insert an advert between posts or forums It would be handy to have

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 13, 2015 - 3:21 pm

Hey Alan,

Yes you can place adverts wherever you like really! Take a look at How to display ads in the forum.

Just remember if you're using Unified as your mobile theme you will need to place adverts inside the mobile rules of the template's, and if you're using Reboot, you will need to place adverts inside the mobile templates (in their own folder).

Hope that helps! Ask if you need any further help.

Avatar
Alan Newman
Member
Free Members
sp_UserOfflineSmall Offline
Feb 17, 2015 - 3:37 pm

Thanks

I will give this a go!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 17, 2015 - 3:46 pm

Let us know how you get on...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alan Newman
Member
Free Members
sp_UserOfflineSmall Offline
Feb 17, 2015 - 6:51 pm

it went really well thanks

 

I had to ftp and edit the mobile theme as it wasnt accessible via theme editor like the default theme

The help page was really good.  I would like to repeat an advertisement every 10th post as a topic can have inumerable posts. Is there an easy way to do this?

Also is there a way to specify which forum or topic specifically the ads can appear in as the template file is used for all topics

 

Thanks!

Avatar
Alan Newman
Member
Free Members
sp_UserOfflineSmall Offline
Feb 17, 2015 - 6:58 pm

I see now it inserts the advert on each page which is what i was looking for.

It would be good to know what could be specified in the 'if' statement to check which forum the topic belongs to as I'd like to run with different ads for each forum.

Is this possible?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 18, 2015 - 3:13 am

I guess the depth of my answer will depend a little on how good you php is smile

So I will start off assuming you know you way around it. If you go to the forum admin > Toolbox > Data Inspector you can turn on options that will display for you the underlying data used to populate all the main forum views. 

So - for example - if you wanted to work with the forum view (index listing of topics) - turn on either 'spForumView' which will display ALL of the data for the entire page - or - 'spThisForum' which will show you the data for each individual entry.

This is a window onto the data objects that are created for the page display and is all available with the main objects already globalised for custom use.

Does this help get you started?

Oh - by the way - the person who turned them on to see them is the only one they will be shown to.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alan Newman
Member
Free Members
sp_UserOfflineSmall Offline
Feb 18, 2015 - 6:56 am

Ahh PHP isn't something I know much about so I think I would be looking to purchase professional services instead of messing up the forums :)

 

do you have a rate card anywhere?

also I has to drop the The JavaScript element from the HTML for the advertisement as I kept getting errors on forum page. The echo syntax required an open and closed single quote around the HTML code but the syntax for the JavaScript also used single quotes in several places which I think was screwing up the php file. The messAge referred to line where JavaScript code was written and said it was expecting a ' or ;

I have looked around on online forums to see how this can be overcome but haven't see anything yet.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 18, 2015 - 11:50 am

The key to that is that you can not mix quote types. So ALL of the quotes in the JavaScript need to be one type (say single) and then you surround the whole lot with the other type (double) for the echo statement. Or visa versa.

So if you can recap in some detail about what you want to accomplish and where we should be able to get you working,

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alan Newman
Member
Free Members
sp_UserOfflineSmall Offline
Feb 20, 2015 - 4:26 pm

Hello,

 

OK I got the javascript to work , thanks

With the code you have already provided I can already post adds after the 1st,5th,9th post on each page for every topic on every forum.  I just wondered if I could make a further specification that forum=x and post is 1st ,5th ot 9th or forum=y and post is 1st,5th or 9th so it will allow me to place different ads on pages for different forums.

 

Thanks!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626