Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Edit profile button - change text
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Sep 24, 2016 - 12:28 pm

Hi there,

if I just want to change the text of the "Profile" button in the forum header, how do I achieve this?

I found this function: sp_ProfileEditButton
But I am not sure how to use it. Do I put this function in my functions.php file and make the changes I need. It would be awesome if you could provide the code.

Another change I want to make is that the breadcrumb does not show the link to the homepage in the beginning. Shall I open another topic for this?
I found the function as well:

sp_BreadCrumbs(

'tagClass=spLeft spBreadCrumbs&tree=0'

);

 
But I don't know where to place it. 🙂


Any help is appreciated!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 24, 2016 - 12:37 pm

before you do any editing of templates can I recommend you establish a child theme? Download the appropriate child theme framework (free from the store) and then switch your theme to using that. You can rename it - which is also recommended. Then come back and tell me which theme you are actually using (the parent) and I can talk you through those changes.

https://simple-press.com/docum.....ild-theme/

andy-signature.png
YELLOW
SWORDFISH
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Sep 24, 2016 - 12:47 pm

Thank you Yellow Swordfish!

That makes perfect sense.
I am actually already working on the customization of a reboot child theme. Until now I did all just via CSS but the changes I just mentioned than need to happen in the template files I guess.

So is it true that if I want to change the text of a button I will have to touch the template files? There is no quicker way through a hook or something?

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Sep 24, 2016 - 12:56 pm

Another thing I want to do is to bring the information of the time zone of the forum and the information about the user timezone into one paragraph, just "separated" by a line break.
Like this:
Forum Timezone: America/New_York
Your Timezone: UTC

And I would like to bring the Admin info and the Moderator Info into one paragraph as well.
The footer layout is quite to scattered in my opinion. The functionalities are great, just the layout needs a lot of fixes to be more consistent if you ask me.

I have hidden some elements by css because I believe that for most users it will just be overwhelming to see all those details.

As you can see it looks already much simpler but the changes I mentioned will make it look much cleaner.

[Image Can Not Be Found]

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 24, 2016 - 1:01 pm

Al right. Sounds good.

So for the profile question you had the right function - sp_ProfileEditButton() and you can see that the lable used on the button is the second parameter (1: arguments, 2: label, 3: tooltip). So you can change the label as you please.

But I am not sure why you should be missing the home link in the breadcrumbs. The code checks that:

  1. There is a home label passed (in the function call sp_BreadCrumbs() - last/second parameter which defaults to the work 'Home'.
  2. A valid home url is available which defaults to the site url as set in your Wp settings
  3. The forum page is not a page that is set to be the front/home page of your website.

If they all check out the home button should just be displayed. So - are they all set?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 24, 2016 - 1:07 pm

For the timezone one then you need to now edit the spFoot templates. Look for the function sp_UserTimeZone() and of you want it over on the left change the spRight class to an spLeft class in the passed arguments.

More info: https://simple-press.com/docum.....rtimezone/

I am unsure why your ;'moderators' list is over on the right like that as you can see from ours (also reboot) that they run one after the other which I assume is what you want. Did you change something?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Sep 24, 2016 - 1:11 pm

Thanks!
I will go more into details tomorrow. Just finishing my work for today, actually.
Hey, I think you misread my question about the breadcrumbs. I do not want the button to the website's homepage. I have only one forum group and would like the first button to go to that forum "homepage" so to speak, which is right now the second button. So basically I just want to get rit of the home button.

Many thanks!

Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Sep 24, 2016 - 2:59 pm

I could not leave my fingers from the keyboard and came up with this but I have the problem that when I add the parameter "get" in the end with value 1, I just get the output "array" and not the actual list of names.
Can you tell me what I am doing wrong?

sp_SectionStart('tagClass=spPlainSection', 'adminstuff1');
 echo 'Administrator: ' . 
 sp_AdminsList('tagClass=whatever&spanClass=adminlist&postCount=0&echo=0') . 
 '   Moderator: ' . 
 sp_ModsList('tagClass=whatever&spanClass=modlist&postCount=0&echo=0');
sp_SectionEnd('', 'adminstuff1');
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 24, 2016 - 3:32 pm

Breadcrumbs:
You should just be able to remove the 'home' label in the template function call. That should be enough I think.

Mods: Well the return value if the moderators IS an array. But you have no code that deals with an array - like a foreach or something. It needs assigning to an array variable and then dealing with. I am still curious as to what is displaying it in the middle of the column like that...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Sep 25, 2016 - 3:39 am

Thank you!
The breadcrumbs look good now.
And I was able to solve most of the other issues just by trying and seeing what happens 😀

The Footer:

[Image Can Not Be Found]

I am almost happy with the looks of the footer.
I still think the "toggle" button for the "statistics" is wayyy to small for users who are not experienced with this kinda interfaces.

How does the timezone feature actually work?
I just used the forum from another laptop, using the same wifi connection and with the time zone (UTC+08:00) Kuala Lumpur, Singapore set in Windows but the forum it showed me that I were in the same time zone like the forum. That was confusing.
Edit: Just check on my girl-friends Android phone and it showed the same thing:
Your timezone is: America/New_York
There is something not working as expected. Please help!

Another question:
I would like to show the notification about the time zone only when the time zone of the user is different from the time zone of the forum - because only than it is relevant - in my opinion.

Would something like this work:

if(sp_ForumTimeZone() === sp_UserTimeZone()) :
    do something ... 
else:
    do something else ...
endif;
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: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17345
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79600