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
Jetpack plugin adds share buttons to every forum post
Avatar
gorky5
Member
Free Members
sp_UserOfflineSmall Offline
Feb 9, 2012 - 3:26 pm

Hi all. I've just upgraded my site's forum to the beta, and it looks mostly great. Many thanks for a brilliant job done - I know you've been working very hard on this.

I have a couple of questions, which I presume others may also encounter at some point. Firstly, I'm using the Automattic Jetpack plugin to add sharing icons to pages. These usually go at the foot of WP posts and pages. However, since upgrading to SP5 it's now adding the icons to the bottom of each and every forum post: see here.

There's nothing in the Jetpack configuration that lets me control this - I have to disable it sitewide to get it to stop doing it on the forum. Can you advise?

Secondly, on my site's homepage I was previously using the php code sf_recent_posts_tag(5, true, true, false, true, 0, false); to show the five most recent topics posted to and their authors (I found the code somewhere on this site). This no longer works - do you know what I can use instead?

Finally, this is from one of my site's users: "when I click on a thread I haven't read, it takes me to the first page of a thread, whereas it used to take me to the last page of the thread." - any ideas?

(There may be more - I've asked my users to give feedback if they spot anything. I hope this is useful in this beta stage, though I'll try not to flood the forum with minor things that just need a little tinkering)

Avatar
juddy
Rookie
Free Members
sp_UserOfflineSmall Offline
Feb 9, 2012 - 5:58 pm

I don't have Jetpack installed on the site my forum resides but have it on other sites, edit the page the forum is on and there should be a sharing tick box right at the bottom of the page, un-tick.

Hopefully that's it, let me know if it works.

 

Cheers

 

Juddy

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 9, 2012 - 10:22 pm

not sure what jetpack sharing does...  but it probably tries to operate on a single wp page... all the forum content is displayed on a single wp page so its likely getting confused...

is there a template tag you can use to display the sharing rather than auto?

Avatar
gorky5
Member
Free Members
sp_UserOfflineSmall Offline
Feb 10, 2012 - 3:26 am

juddy said

I don't have Jetpack installed on the site my forum resides but have it on other sites, edit the page the forum is on and there should be a sharing tick box right at the bottom of the page, un-tick

Thanks juddy - I'd not noticed that option in the edit screen. All seems fine now.

Mr Papa - do you have any ideas about the code I was using on v4 to show most recently-updated threads on my site's homepage? Is there a replacement to sf_recent_posts_tag(5, true, true, false, true, 0, false); I can call?

Avatar
juddy
Rookie
Free Members
sp_UserOfflineSmall Offline
Feb 10, 2012 - 3:54 am

Not sure about code but there is a built in widget you can call on in your homepage.

Activate the SP plug-in Template Tags and Widgets and a recent post widget will become available to you.

 

Juddy

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 10, 2012 - 5:54 am

juddy: Thanks for the info. I will try and remember that if it comes up again.

gorky5: As juddy says there is the widget. The template tag still exists (in the 'template tags' Sp plugin) but it has changed name and the way parameters are passed. It is also more powerful now with extra options and control. You can look at the parameters you can pass at the top of the file but we also are due to get the documentation under way very soon.

andy-signature.png
YELLOW
SWORDFISH
Avatar
gorky5
Member
Free Members
sp_UserOfflineSmall Offline
Feb 10, 2012 - 8:31 am

Thanks all. I've had a look at the plugin files but php isn't my strongest point. On juddy's suggestion I think I'll add another plugin to allow widgets on pages* until the documentation is in place (I'd normally rather not install extra plugins if they can be avoided).

I really like the new Simple Press, btw. It seems zippier and far more elegant out-of-the-box than v4. Well done everyone involved.

*Edit - I should explain, I can have widgets in the sidebar but I want the recent posts info to also appear in a different area of my homepage. Hence the need for a plugin to allow widgets in the main content area.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 10, 2012 - 9:02 am

not sure why you need a plugin to allow widgets in main content area... that is really just a theme thing...

5.0 should be very noticeably faster...  much time spent on throughput and query improvements...

you can start with the default recent post template tag with no options and it should look like it did before with no options...  but then can change it up with the options (we can help) if not quite what you want...

Avatar
gorky5
Member
Free Members
sp_UserOfflineSmall Offline
Feb 10, 2012 - 10:30 am

Thanks for the offer. I got there in the end by using a plugin (called "amr shortcode any widget"), then placing the SP widget on my homepage. I needed a third-party plugin because the area where I wanted to place the feed wasn't a widgetised area. You're right, it's a theme thing.

If I wanted to ditch that plugin, what php code would I use to call the recent post template tag? And if you're offering to help with the options, I'd like it to display just as it is on the homepage (limit to 5, display order ATFUD, scope of link: forum, avatar size 25px etc). I presume this can be done purely in php but I'm not that good.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 10, 2012 - 11:02 am

the call to the new tag is:

sp_RecentPostsTag();

if you look in the /library folder of the template tags plugin you will see the file called sp-RecentPosts-tag.php and at the top of that file is a complete list of all the optional arguments that can be used along with the pre-set default values.

Values are passed using the same method that WordPress now uses for all the newer template tags which is 'name=value' with each one separated by an ampersand. You only need to pass the arguments that you wish to change from the defaults.

So out of the ones you have actually mentioned - the only one that doesn't match the defaults is itemOrder as by default the 'A' (avatar) is not used. So to rectify that you can pass:

sp_RecentPostsTag( 'itemOrder=ATFUD');

and if you want to change anything else add an ampersand after the ATFUD value and pass a second name=value pair./ Note the overall string must be quoted.

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: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625