Current User: Guest
Please consider registering


Register? | Lost Your Password?

Search Forums:


 






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

Forum buttons in my theme files.

Information
UserPost

11:57 am
May 30, 2009


piter33

Member

posts 25

 
1

Post edited 7:02 pm – May 30, 2009 by piter33
Post edited 7:02 pm – May 30, 2009 by piter33
Post edited 7:16 pm – May 30, 2009 by piter33


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

12:24 pm
May 30, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14889

 
2

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…

12:30 pm
May 30, 2009


Yellow Swordfish

Peterborough, England

SPF Master
SPF Master

posts 15150

 
3

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

1:36 pm
May 30, 2009


piter33

Member

posts 25

 
4

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

1:47 pm
May 30, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14889

 
5

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

8:00 am
Dec 28, 2009


patung

Member

posts 78

 
6

  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?

10:40 am
Dec 28, 2009


Yellow Swordfish

Peterborough, England

SPF Master
SPF Master

posts 15150

 
7

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

Yellow Swordfish

7:53 pm
Dec 28, 2009


patung

Member

posts 78

 
8

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.



9:26 pm
Dec 28, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 14889

 
9

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

$comment->user_id

9:40 pm
Dec 28, 2009


patung

Member

posts 78

 
10

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>'); ?>;

Reply to Topic:
Forum buttons in my theme files.

Guest Name (Required):

Guest Email (Required):

NOTE: First Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
3 + 10
   


Information


About the Simple:Press Forum

Forum Timezone: America/Chicago

Most Users Ever Online: 118

Currently Online: cavamondo, sgendry, chris.brown
44 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 3
Forums: 10
Topics: 6343
Posts: 45437

Membership:

There are 4375 Members
There have been 1720 Guests

There are 2 Admins
There are 2 Moderators

Top Posters:

jim - 415
ovizii - 232
Tal - 206
Isaak - 183
Barandum - 178
David Polensky - 173
neon - 154
peterhol - 145

Recent New Members: beverly, ivie97, yogita, Nickinchicago, otherwhirl, CWS, Xephan, asnevitt, innerrock, guilli

Administrators: Yellow Swordfish (15150 Posts), Mr Papa (14889 Posts)

Moderators: -Radio- (1251 Posts), Luffer (482 Posts)