Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
template tags, extra buttons, ccs
Avatar
puttee
Member
Free Members
sp_UserOfflineSmall Offline
Dec 27, 2011 - 5:08 am

Hi, 

I have a bunch of questions regarding to your new version of simple:press.

1) I copied an modified a basic theme for my own, but I cant find the style for the following (see picture 1.) In all themes the color of the font is black. But I need it in white. Till now I solved this with a tag in my style.css (.ddTitleText). But how/where to set the color in ...forum-themesdefaultstylesoverlays*.php ?

simplepress1.jpgImage Enlarger

 

2) extra buttons in the top menu bar

With older versions of simple:press it was possible to set my own buttons in the top of the forum (see picture 2.) Is it or will it be possible in future?

 

3) template tags

I've used two template tags in my wordpress sidebar in the past:

<?php sf_recent_posts_tag(6, true, true, true, true, 0, true); ?>
<?php sf_recent_posts_tag(6, false, false, true, true, 22, true); ?>

which now doesnt work anymore, also with the accordant plugin "template-tags". How can I solve this problem?

 

4) styles for plugins

I use some plugins like "private message" or "subscription", but the style doesnt fit to my theme.

simplepress2.jpgImage Enlarger

My question: Where can I set the accordant styles so that they not be will overwritten after an plugin upgrade?

Best regards

puttee

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 27, 2011 - 5:36 am

Well - as you know we do not have all of the documentation in place yet but I will do my best.

1 - Look in the overlay files - or whatever overlay you choose to use. You will find all colours defined in there where they can be easily and quickly changed.

2 - Not sure quite what you mean by 'set' but all buttons and all display positions are quite easily changed in the parameters you pass in a template to the template functions. So, for example, buttons can be turned into simple links, icons changed, the display positions moved about etc. Until we have the Codex up and running you can look at the functions themselves to see the available parameters that can be used to make such alterations.

3 - the name of the template tag has changed as has the parameters that can be passed. It is now far more powerful and changeable from the call itself. Again you will need to look at the function where it is all explained. /template-tags/library/sp-RecentPostsTag.php. The function to call is sp_RecentPostsTag() once the template-tags plugin is activated.

4 - Will let Steve answer this one as he knows more about this than I do.

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

#4...  when our plugins (cannot guarantee for user contributed) all include a css file in plugin/resources/css which you can modify to your content...   the good news is that all our plugins check for that same css file in your theme first before loading it from the plugin...  so you can copy that css file to your theme, drop it in the styles folder with the main theme css file and customize to match the theme...  then the plugin will load your css and not the default provided with the plugin and it will be safe from upgrades...

of course, if any new features are added to the plugin that require css, you wont be able to use with out updating your css file in your theme... but that wont be prevalent... with themes and plugins, we will need to be very cognizant of backward compatibility...

Avatar
puttee
Member
Free Members
sp_UserOfflineSmall Offline
Dec 28, 2011 - 3:17 am

Thank you very much for your hints. 

 

#2 I tried to find out how I should implemtent a new button in my theme next to the top toolbar buttons (members, subscribed, inbox, proifl etc.) But I didnt get it. Maybe you can explain it into more detail. Which file I have to edit and where should I put my e.g. <a href ....>Link</a>  ? 

...forum-themes/mytheme/templates/spHead.php  ?

 

#3 I changed the call function to sp_RecentPostsTag(). It works also with my old paramters. But as you say this function is more powerfull in 5.0.  I looked in to the sp-RecentPoststag.php to learn more about the parameters. But I didnt found out how to use this parameters in the call function. Maybe you can give an example?

 

#4 works perfect with outsourcing the *.css

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 28, 2011 - 9:07 am

2 - all the current buttons you mention are in the forum 'header' so you need to start by looking at the 'spHead.php' template for the theme you are using. if you just take a few moments to look at each function name in there I think it is fairly obvious which function displays which item. This is a php file so you can add whatever you want wherever you want it using normal php and html.

3 - You can set the parameters in the way that Wp also uses parameters in modern template tags. Either as an array or as a string of arguments separated with an ampersand. Look at a typical Wp template tag in the Wp codex for examples.

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

#2 you are on the right track... the theme template files are nothing more than a php file where you can add any php  you like...  we just provide a slew of template tags to make getting at sp data easier... 

so yes, in spHead.php, you will see this section that outputs the buttons in question:

        sp_SectionStart('tagClass=spPlainSection');
            sp_LoggedInOutLabel('tagClass=spLabelSmall spLeft', __sp('Logged in as<br /><b>%USERNAME%</b>'), __sp('Please consider registering<br /><b>guest</b>'), __sp('Welcome back <b>%USERNAME%</b><br />Please log in to post'));
            sp_LogInOutButton('tagClass=spButton spRight', __sp('Log In', '2011'), __sp('Log Out'), __sp('Log in and log out'));
            sp_RegisterButton('tagClass=spButton spRight', __sp('Register'), __sp('Register'));
            sp_ProfileEditButton('tagClass=spButton spRight', __sp('Profile'), __sp('Edit your profile'));
            if (function_exists('sp_PmInboxButton')) sp_PmInboxButton('tagClass=spButton spRight', __sp('Inbox:'), __sp('Go to PM inbox'));
            if (function_exists('sp_SubscriptionsReviewButton')) sp_SubscriptionsReviewButton('tagClass=spButton spRight', __sp('Subscribed:'), __sp('Review subscribed topics'));
            if (function_exists('sp_WatchesReviewButton')) sp_WatchesReviewButton('tagClass=spButton spRight', __sp('Watching:'), __sp('Review watched topics'));
            sp_MemberButton('tagClass=spButton spRight', __sp('Members'), __sp('View the members list'));

            sp_InsertBreak('direction=right');

            sp_LastVisitLabel('tagClass=spLabelSmall spRight', __sp('Last visited %LASTVISIT%'));

        sp_SectionEnd('tagClass=spClear');

so if you want another button next to members button, after the template tag above, just output it or use ?> and <?php to enter html mode...

#3 not sure what you want...  in the start of the code section for the function (yes, we are working on some online docs) find the $defs array definition... those are the arguments you can pass to the function to control what it does...  they are explained in more detail above in the comment area above the function...  one of the key ones if itemOrder...  that controls which elements (forum name, topic name, date, avatar, etc) will be displayed and in what order... default is forum, then topic, then poster name and finally date...  you can move the order or add/delete items...  then using the before and after args, you can alter the appearance, ie add/remove linebreaks, etc

Avatar
puttee
Member
Free Members
sp_UserOfflineSmall Offline
Jan 8, 2012 - 6:11 am

Thank you for your detailed answer. Everything works now as I want except one thing: 

 

#3 - I want to use a modified template tag as mentioned in another post: 

<?php sp_RecentPostsTag('beforeForum=In the Forum: &afterForum= &beforeUser= <b>&afterUser=  </b>&beforeTopic=  posted:&afterDate=<hr />&itemOrder=FUTD&limit=12');?>

I want to extend this code by adding &TopicIds to list up just posts from a specific forum ID. So this would looks like this:

<?php sp_RecentPostsTag('topicIds=22&beforeForum=In the Forum: &afterForum= &beforeUser= <b>&afterUser=  </b>&beforeTopic=  posted:&afterDate=<hr />&itemOrder=FUTD&limit=12');?>

But for this I get a warning:

 Warning

    : implode()[

function.implode

    ]: Invalid arguments passed in

E:\My Server\htdocs\miranda-fusion\wp-content\sp-resources\forum-plugins\template-tags\library\sp-RecentPosts-tag.php

     on line 

131


I also get this warning, when I used the sidebar widget and insert the argument "22" (or any other ID which exists) in the form "Topic IDs:"

 

#4 - I want to participate on language translation. If you still seeking for a language validator of the GERMAN language, maybe I'm your man.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 8, 2012 - 7:02 am

I am unable to replicate this error at all.

Are you using the latest builds of both the core SP and the template tags plugin? I suspect not as the widget has been changed from topic ids to forum ids and I believe that change made it into the last build made available. Can you please check that?

#4 Our long time German translator has actually already taken on the role of Validator for the 'de' translation but thanks for the offer. All the same I will ask him if he would like to share that role!

andy-signature.png
YELLOW
SWORDFISH
Avatar
puttee
Member
Free Members
sp_UserOfflineSmall Offline
Jan 8, 2012 - 8:53 am

Well, an update of the plugin solves the problem. Now I can use the powerfull sp_RecentPostsTag 🙂

Thanks.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 8, 2012 - 10:50 am

Good news. Thanks for letting us know.

andy-signature.png
YELLOW
SWORDFISH
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