A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Widgets
Aug 27, 2010
7:18 am
Member
Forum Posts: 6
Member Since:
Aug 27, 2010
Offline

Last week, I installed Simple:Forum to replace a previous and rather crippled forum that I was running. While S:F has a steep learning curve, I'm really happy with the software: so many options and capabilities that I had been longing for… Meanwhile, I have tuned the forum to quite some degree: revamping the chosen theme, tampering with the php, etc. I've also redone much of the language files. Please look forward to receiving a better NL translation soon.

But there's one thing I can't figure out: the widget. Where and how do I control the formatting and the lay-out of the widget's output? Reading the support forums didn't help, unfortunately. I find it difficult to get information on the basics: for instance, does what I define in the widget relate to what I define under Admin -> SForum Components -> Announce tags?

I want a simple output on my main site's sidebar:

'Forum name'
'Topic_of_most_recent_posting' – 'poster' (times 5, or 8)

What I get through the widget when I _only_ select no. of postings and is this:

'Forum name'
'Topic_of_most_recent_posting'
blank line
'poster'
blank line (times 5, or 8)

…. so there are some 'p' in there that I neeed to get rid of. But how? There's talk of widget templates in the wiki, but I can't seem to find examples, nor where to put them or how to use them.

A current example of the widget in my sidebar – using only topics – can be seen at http://www.spaink.net/ : it's under 'Forumberichten'.

thanks & regards,

Aug 27, 2010
7:57 am

SP Master
Forum Posts: 22175
Member Since:
Nov 9, 2008
Offline

I have no idea what you refer to by 'widget template'. The wiki – api/widget – lists all of the classes that are used by the widget. Like most things of this nature it is used outside of the forum thus no SP CSS is loaded and it is normal for such CSS to be added to the WP theme stylesheet.

As it stands at the moment – it will be inheriting any styling from your theme.

Yellow Swordfish
Aug 30, 2010
10:01 am
Member
Forum Posts: 6
Member Since:
Aug 27, 2010
Offline

If you search for 'widget' in the wiki, the third item that shows up is 'Template Tags Overview'. There it says: "Template tags are special, ready-made routines for displaying pieces of
Simple:Press Forum information in various locations on your site such as
a widget, sidebar, footer, etc.". Hence, I was looking for templates and template tags to control the lay-out of the widget's output in the sidebar… Hence my misunderstanding.

 

Meanwhile, I've found the solution. I could get rid of unwanted <p>'s in the widget's output by changing some of the code in sf-template-tags.php. And I found a tiny error there, which actually prevented my changed code from being performed. In the coment at line 45, the ' in:

 

# are we passing forum ID's?

 

prevented the whole next block from being executed.

Aug 30, 2010
12:54 pm

SP Master
Forum Posts: 22175
Member Since:
Nov 9, 2008
Offline

really? How odd. Maybe you have some obscure php ini settings we haven't encountered before. If you find what the cause may be then we would appreciate knowing.

Yellow Swordfish
Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online: kfworld, ahcreate
62 Guest(s)

Currently Browsing this Page:
1 Guest(s)

See All Online Activity

Top Posters:

-Radio-: 1251

Lee H: 606

Luffer: 535

Conrad_Farlow: 499

jim: 478

neon: 263

ovizii: 240

Tal: 240

Member Stats:

Guest Posters: 2624

Members: 7354

Moderators: 1

Admins: 2

Forum Stats:

Groups: 5

Forums: 16

Topics: 10874

Posts: 79443

Moderators: Brandon C (162)

Administrators: Yellow Swordfish (22175), Mr Papa (23688)