Support Forum
Hi there,
I'd like to add a "subcribe to topic" button on top of the forum list. There is one such a button on the bottom of the page, but I want a duplicate on top. Which file do I have to edit to accomplish that? I cannot find the template file that displays that button
I am using the default theme.
Thnx!
we have said this a zillion times but will say it again... do not edit our themes.. make your own theme first to keep from losing changes on updates... see: http://codex.simple-press.com/.....g-a-theme/
and dont edit core... edit your theme...
so the template file that will be in use will be based on the current page view... since you are looking at a bunch of posts in a topic, its topic view... so the template file is spTopicView.php... sorry, but that is not the answer at least not for finding the code you want...
in this case, the button is output at the bottom of the page in the footer... so its output in template file spFoot.php... this code:
if (function_exists('sp_SubscriptionsSubscribeButton')) sp_SubscriptionsSubscribeButton('tagClass=spButton spLeft', __sp('Subscribe'), __sp('Unsubscribe'), __sp('Subscribe to this topic'), __sp('Unsubscribe from this topic'));
you can duplicate that function anywhere else you want an other button - at the top for example as you stated...
please be advised, if you want your page to pass an html validation, you will need to give each button a unique ID... simply duplicating the code will give them the same ID...
I would point you to the Codex, but it seems to be lacking a bit covering the template function arguments...
basically, add in a unique ID to each:
tagId=top and tagId=bottom
one per template function call... ie
if (function_exists('sp_SubscriptionsSubscribeButton')) sp_SubscriptionsSubscribeButton('tagId-top&tagClass=spButton spLeft', __sp('Subscribe'), __sp('Unsubscribe'), __sp('Subscribe to this topic'), __sp('Unsubscribe from this topic'));
Visit Cruise Talk Central and Mr Papa's World
Hi Mr. papa,
I just created my own theme with all modifications. I all works
One more question:
How can I give some forums specific icons?
In the admin panel the drop down boxes for
Custom forum icon | Select icon |
Custom forum icon when new posts | Select icon |
Custom topic icon | Select icon |
Custom topic icon when new posts | Select icon |
are empty ?!
In which folder should I place the custom icons in my custom theme without the risk of losing them with an update?
Kind regards,
Jeroen
It is a standard file uploader. That means one file at a time - no folders. It does not use a sprite file either - we have no idea what size you may choose to use so creating the CSS would not be possible.
any image format will do as long as it displays. And size is entirely up to you although the current, default icons are 32px x 32px. remember that if you change the file size then you may need to adjust the column widths in the template file.
YELLOW
SWORDFISH
|
1 Guest(s)