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
Forum buttons in my theme files.
May 30, 2009
11:57 am
Member
Forum Posts: 25
Member Since:
May 30, 2009
Offline

Hello,

Is there a possibility of adding extra buttons inside my theme files that can direct a person straight to a new topicprivate message a specific user or show up profile page?

What I really want to do is:

  1. Put this[Add Topic] button under each wordpress article, so after reading an article people can easily make new topics in forum.
  2. Also a [PM a User] button link next to his comment.
  3. Also [Show Profile] next to somebody's comment.
Or perhaps you know a better idea how to integrate comments and forum?

I know there is something called: Post Links, But I wanted just a button in my theme's file (single.php) so people can start a topic with whatever name they want it to be.

Thanks,

Peter

May 30, 2009
12:24 pm

SP Master
Forum Posts: 23582
Member Since:
Dec 10, 2006
Online

take a look at the template tags in the online help (in your spf admin area)… some of what you want to do is available in there…

if you are comfortable with php, you can lift a lot of the code pieces to get what you want…

have you checked the forum – options – links panel? its built in where you can integrate the comments and forum topics – at least one way…

May 30, 2009
12:30 pm

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

there is also a template tag for the 'add new topic' link you want and that uses the forum set up in Options > Tags.

Yellow Swordfish
May 30, 2009
1:36 pm
Member
Forum Posts: 25
Member Since:
May 30, 2009
Offline

Thank you so much for quick replies.

Wow. The help online section in spf admin area is just what I needed. Really amazingly done. Smile

Thanks a lot!Smile

-Peter

May 30, 2009
1:47 pm

SP Master
Forum Posts: 23582
Member Since:
Dec 10, 2006
Online

thanks for the kind words! unfortunately, not enough notice the online help and use it…

Dec 28, 2009
8:00 am
Member
Forum Posts: 83
Member Since:
Dec 6, 2008
Offline

  1. Also a[PM a User] button link next to his comment

Has this been done, putting a 'send pm' tag in the comments.php of wordpress and it automatically knows the correct user id for the 'to' field? Any tips there?

Dec 28, 2009
10:40 am

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

There is a template tag you can use for this. Please see this wiki page.

Yellow Swordfish
Dec 28, 2009
7:53 pm
Member
Forum Posts: 83
Member Since:
Dec 6, 2008
Offline

I did try that before I posted, I put

<php sf_sendpm_tag($userid, '%%Send this User a PM</a>'); ?>;

and

<php sf_sendpm_tag($userid, '%%Send this User a PM</a>'); ?>

and

<?php sf_sendpm_tag($userid, '%%Send this User a PM</a>'); ?>

in the wordpress comments loop just after

<cite><?php comment_author_link() ?></cite>

but didn't seem to output anything. I suspect I'm not getting the userid part of it right. I can't actualy specify
 the userid as I have no particular user in mind, it's meant to be in the loop so dynamically outputting the correct id
for each commenter but the examples use a specific id.



Dec 28, 2009
9:26 pm

SP Master
Forum Posts: 23582
Member Since:
Dec 10, 2006
Online

If you are in the comments.php or similar file, you need to pass the user id which should be

$comment->user_id

Dec 28, 2009
9:40 pm
Member
Forum Posts: 83
Member Since:
Dec 6, 2008
Offline

This echoes the comment userid on the page

<?php $user = get_userdata($comment->user_id);
echo $user->ID; ?>

But I guess it needs to be echoed where '32' is here:

<php sf_sendpm_tag(32, '%%Send this User a PM</a>'); ?>;
Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online: Mr Papa, SPQC
58 Guest(s)

Currently Browsing this Page:
1 Guest(s)

See All Online Activity

Top Posters:

-Radio-: 1251

Lee H: 606

Luffer: 535

Conrad_Farlow: 485

jim: 478

neon: 263

ovizii: 240

Tal: 240

Member Stats:

Guest Posters: 2616

Members: 7328

Moderators: 1

Admins: 2

Forum Stats:

Groups: 5

Forums: 16

Topics: 10839

Posts: 79118

Moderators: Brandon C (158)

Administrators: Yellow Swordfish (22131), Mr Papa (23580)