Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Modifying Simple:Press display start, moving to my theme
Avatar
sptab
Member
sp_UserOfflineSmall Offline
Dec 19, 2011 - 4:05 am

First, I wanted again to thank you for the great forum software you are building with Simple:Press

 

I am trying to modify the start of the forum output around <!-- Simple:Press display start --> in the HTML.

For now I am changing content/sp-template-control.php which isn't convenient as it is erased by any SP5 upgrade.

I am not sure if there are any hook like SP4, is there a possibility to move my changes in my custom theme ?

 

Thank you.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 19, 2011 - 4:24 am

It is really impossible to advise you unless you tell us what it is you are actually wanting to achieve...?

andy-signature.png
YELLOW
SWORDFISH
Avatar
sptab
Member
sp_UserOfflineSmall Offline
Dec 19, 2011 - 4:46 am

Well the change I have made is about adding a <DIV> at the start of the forum output.

I have already done it in content/sp-template-control.php and it's working fine, if possible I just want to move this change to the theme files, so I don't touch SP5 core files.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 19, 2011 - 7:48 am

I think if you actually go and look at the theme templates you will pretty quickly see where you should be doing this. The template names are pretty obvious as well.
As always we recommend not editing a supplied theme but duplicating it and customising your own.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2011 - 9:30 am

and why would you modify the core template control file??  there are numerous hooks and filters in that very location that you can use...

and you can use the theme spFunctions.php file (as Andy says, start with your own theme) to add any special hook code that you want...

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Dec 19, 2011 - 9:45 am

I was already running on a copy of the default theme. I went for modifying the core code because I did not know about the spFunctions.php way of modifying the forum. Great news, thanks a lot for that wink

My SP5 forum is online since 4 days, no bug to report so far, thanks again guys.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2011 - 10:11 am

cool. thanks for the update...

SP uses hooks, actions and filters just like WP... and our theme functions file works just like the one in a wp theme...

we have started a series of codex pages (http://codex.simple-press.com) for 5.0 but its pretty barren currently... hoping to get it populated by release of 5.0... User contributions always welcome to the codex!!!

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