Support Forum

Icon change

FO foxy7
foxy7
Member

Been trying to change icon for the “Log In/ Log Out” button, and I understand that this line in “spHead” needs to be changed:

sp_LogInOutButton(‘tagClass=spButton spRight’, __sp(‘Log In’), __sp(‘Log Out’), __sp(‘Log in and log out’));

to something like:

sp_LogInOutButton(‘tagClass=spButton spRight&icon=sp_rssicontest.png’, __sp(‘Log In’), __sp(‘Log Out’), __sp(‘Log in and log out’));

The image is added to the theme images folder, but no change..

Thanks for you help.

9 Answers

New Answer

MP Mr Papa
Mr Papa
Member

well, there are two distinct icons.. one for log in and one for logout…  so you need to specifiy the icon using:

logInIcon
logOutIcon

so you were pretty close and correct for the routine with just one icon… ;)

more reference:  http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_loginoutbutton/

FO foxy7
foxy7
Member

damn! :D

hmmm, could you give me an example of how the line should look.?

YS Yellow Swordfish
Yellow Swordfish
Member

Well that was close as Steve said. That function just does not use the argument icon because it requires 2 icons. So -it would be

sp_LogInOutButton('tagClass=spButton spRight&logInIcon=ICON-NAME.png&logOutIcon=ICON-NAME.png', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out'));

Obviously changing the ICON-NAME for the ones you want to use. This is standard WordPress nomenclature for passign arguments to functions. Each item separated by an ampersand – no embedded quotes and no spaces unless required (like in the tagClass argument). Oh – and the case is important. So use the caps and lower case correctly as shown.

FO foxy7
foxy7
Member

Great!!

Is it possible to change the “Mail Inbox” icon?

Also, I have been looking to change the “Add new topic to this forum” icon located under the post count, sub-forums included, but I can’t seem to find anything. Can you guide me? Muuuch appreciated :)

YS Yellow Swordfish
Yellow Swordfish
Member

Before we go any further have you considered that actually the easiest way to change icons is just to replace one in the theme /images folder with yours but with the same name as the original?

FO foxy7
foxy7
Member

Wow…that was easy, thanks for the useful tip! One last question regarding the “Mail Box” icon. Since it’s a plugin, will any customization for this not be lost during an update?

YS Yellow Swordfish
Yellow Swordfish
Member

Find the icon you wish to replace in the plugin and then add your custom icon with the same name into your theme /images folder. It will look there first and of it finds one of the correct name will use that.

So in this way as long as you made a custom theme it will be preserved when the PM plugin is updated.

FO foxy7
foxy7
Member

Wanted to follow up on thread, since you just released an update for the Private Messaging plugin.

I replaced the icon with the exact same name in the imagine folder as advised and it was overwritten perfectly, but the icon was not preserved after the update and it has now been changed back to standard. My custom theme is set up correctly, so I’m not really sure why it was not preserved.? The folder:

wp-content/sp-resources/forum-plugins/private-messaging/resources/images/

Thanks for you help.

MP Mr Papa
Mr Papa
Member

that folder is NOT preserved…  its a plugin folder and wp will remove it before updating the plugin to the newest version…

to keep from being overwritten, the icon MUST be located in your sp theme images folder…  then its not overwritten…  note, that is what Andy said to do:

into your theme /images folder

the theme images folder, not the plugin…