Support Forum
How do I actually make the changes in the theme editor? Let's take this request for instance: https://simple-press.com/suppo.....avatars-1/
What am I supposed to place inside this empty space? The question in that thread was how I could change the avatars in forum view to reflect the author. This is what I was advised to do:
In Reboot you will need to edit the spForumViewDesktop.php template in the theme folders or – in other themes the spForumView,php template. Preferably add the template to your child theme and edit that.
Look for the display function named sp_TopicIndexIcon() and comment it out. It is about two-thirds of the way down the file.
Underneath the commented out function add the following call:
1 sp_UserAvatar('tagClass=spRowIcon spLeft&context=user', $spThisTopic->first_user_id); and that will display the avatar of the user who started the topic.
This will, of course, remove all use of custom icons so it will no longer show when new, unread posts have been made to a forum
That is because when using the child theme, anything you want to change template wise you will need to firstly add. So - you will need to copy spForumViewDesktop.php from the reboot > templates > desktop folder into your child theme's templates > desktop folder.
But as Steve said - the theme editor wont see the 'desktop' or 'mobile' folders, so you will need to make the changes in an external editor.
Ike said
That is because when using the child theme, anything you want to change template wise you will need to firstly add. So - you will need to copy spForumViewDesktop.php from the reboot > templates > desktop folder into your child theme's templates > desktop folder.But as Steve said - the theme editor wont see the 'desktop' or 'mobile' folders, so you will need to make the changes in an external editor.
So I copied the spForumViewDesktop.php from reboot, then added it into the desktop folder in the reboot child folder, made the changes necessary in noteped, yet the changes did not take? Am I missing a step here?
Yellow Swordfish said
Did you also make the child theme your current theme in the forum admin?
Yes, I have the reboot-child framework as my theme. I know it works as I have uploaded my overlay and have it working. I just can't get this specific code to work.
When you copy the spForumViewDesktop.php and place it in the desktop folder in the child folder, doesn't the whole document have to be re-read? Does this slow loading? Does every single line of code have to be there, or can I delete everything and just add this?
sp_UserAvatar('tagClass=spRowIcon spLeft&context=user', $spThisTopic->first_user_id);
No it requires the whole page of code. This is then used instead of the one in the main Reboot theme. It really is about as close as you can get with WordPress...!
What about caching? Could the old page be cached anywhere? This is nothing different to what we do here only we do it with the Group View and not the Topic View template
YELLOW
SWORDFISH
|
So I just tried adding the thanks reputation. I copied the sptopicviewdesktop.php and added this line of code:
sp_PostIndexUserRegistered('tagClass=spPostUserRegistered spCenter', __sp('Member Since:<br /> %DATE%')); sp_thanks_user_stats('tagClass=spCenter spThanksUserStats', $spThisPostUser->user_id, 'Thanked %THANKED% times'); sp_thanks_post_user_reputation('tagClass=spCenter spPostUserThanksReputation', 'Reputation:'); sp_PostIndexUserStatus('tagClass=spCenter spPostUserStatus', __sp('Online'), __sp('Offline'));
I added the file into the mobile folder in the reboot-child and nothing changed.
Hey Alex,
Really sorry - Seems we are still working out the kinks!
Because Reboot uses a different folder structure to make for a clearer definition between desktop and mobile as far as templates go, you also need the parent template.
So if you are changing spHeadDesktop.php, you will also need spHead.php in your reboot-child > templates folder - i.e
reboot-child > templates > spHead.php
reboot-child > templates > spForumView.php
reboot-child > templates > Desktop > spHeadDesktop.php
reboot-child > templates > Desktop > spForumViewDesktop.php
If you take a look at the plain spHead.php or any other parent template (one that also exists in the desktop or mobile folder) you will see why - it's only a couple of lines but it includes the important if mobile check. Without that it doesn't know spHeadDesktop.php or others exists.
Again - sorry for the delay in getting this right, it's actually an easy one to overlook!
1 Guest(s)