UltraBB Forums Home 
Home Search search Menu menu Not logged in - Login | Register

Welcome to the UltraBB public support forum! Did you know there is an inexpensive totally integrated gallery available for UltraBB? Read more here: Gallery Details

 Moderated by: Jim Page:    1  2  Next Page Last Page  
New Topic Reply Printer Friendly
"My Posts" Link  Rate Topic 
AuthorPost
 Posted: Fri Jun 25th, 2010 01:36 am
  PM Quote Reply
1st Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
Question - In my QUICK LINKS drop down links I would like to have a link that says My Posts or Go To My Posts that would pull up the posts of the member clicking it. So each member when logged on could quickly go to their posts - this link -

http://www.watchfreeks.com/view_user.php?id=WhateverTheirNubmerIs&posts=AllTheirPosts


When I am creating the link in the files - what URL do I use so this link will work for each person when they are logged in to see their posts.

I hope I explained that correctly, lol

Thanks for the help

Back To Top PM Quote Reply  

 Posted: Fri Jun 25th, 2010 12:59 pm
  PM Quote Reply
2nd Post
bartmanaz
License Holder


Joined: Sun Apr 11th, 2010
Location: Sierra Vista, Arizona USA
Posts: 55
Status: 
Offline
Mana: 
User Gallery
They can already access that info by clicking on their own user name>profile>posts. This would seem to duplicate that capability.

Bart

 

Back To Top PM Quote Reply

 Posted: Fri Jun 25th, 2010 01:01 pm
  PM Quote Reply
3rd Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
bartmanaz wrote: They can already access that info by clicking on their own user name>profile>posts. This would seem to duplicate that capability.

Bart

 


you are correct - i am trying to eliminate the extra step of having to go to their profile and make it a one click option from any page by putting it on the main navigation Quick Links Menu. On many forums there is a button available to "See My Posts" or "Go to my Posts" on the main menu of options. That is what I am trying to mimic. I know it can be done, I just want to make sure to code it properly to take the people to their specific post page. Thanks.

Back To Top PM Quote Reply  

 Posted: Fri Jun 25th, 2010 01:54 pm
  PM Quote Reply
4th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
TVDinner wrote:On many forums there is a button available to "See My Posts" or "Go to my Posts" on the main menu of options. That is what I am trying to mimic. I know it can be done, I just want to make sure to code it properly to take the people to their specific post page.
Hi TVD,

This link works to create a My Posts button if you put it in the index_header template. I can't tell you where to put it because your theme is different from mine:

<a class="navbutton" href="$ base_dir/view_user.php?id=$mark_all_read&posts=1">My Posts</a>


Likewise, this link creates a My Started Topics button:

<a class="navbutton" href="$ base_dir/view_user.php?id=$mark_all_read&topics_started=1">My Started Topics</a>


EDIT
: in both cases remove the space between $ and base. The space is needed here to defeat this forum.


($mark_all_read contains the user ID).

regards,

Martin.

Last edited on Fri Jun 25th, 2010 02:08 pm by martin_wynne

Back To Top PM Quote Reply

 Posted: Fri Jun 25th, 2010 02:23 pm
  PM Quote Reply
5th Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
Martin - thank you very much. I am going to try this today.
Much appreciated and I will post back if it works for me.
Thank you.

Back To Top PM Quote Reply  

 Posted: Fri Jun 25th, 2010 03:28 pm
  PM Quote Reply
6th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
TVDinner wrote: Martin - thank you very much.
You're welcome. :)

To be strictly correct you should make the links conditional like this, so that they don't appear for guest visitors. However, if you do this each one must start a new line in the template and be all on one line. Remove the spaces between $ and base:


?mark_all_read('<a class="navbutton" href="$ base_dir/view_user.php?id=$mark_all_read&posts=1">My Posts</a>':'')


?mark_all_read('<a class="navbutton" href="$ base_dir/view_user.php?id=$mark_all_read&topics_started=1">My Started Topics</a>':'')


Note that :'') at the end is two single quotes, not a double quote.

regards,

Martin.

Last edited on Fri Jun 25th, 2010 03:33 pm by martin_wynne

Back To Top PM Quote Reply

 Posted: Sat Jun 26th, 2010 05:17 am
  PM Quote Reply
7th Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
Hi Martin - question

I have my Quick Links drop down options in the Menu2 template.

So when I try to add this code to the other menu options it does not work

<tr><td class="clean"><a href="/forum/view_user.php?id=$mark_all_read&posts=1">My Posts</a></td></tr>

It creates the link in the drop down menu but I get and "Invalid request" Error page when a user clicks the link

what am I doing wrong?

Back To Top PM Quote Reply  

 Posted: Sat Jun 26th, 2010 09:19 am
  PM Quote Reply
8th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
TVDinner wrote: what am I doing wrong?
Hi TVD,

You didn't read my post:

This link works to create a My Posts button if you put it in the index_header template.
The user ID isn't available in the menu templates. It would need a mod to the php file (unless Jim or David can see otherwise?). I've posted php mods in the past but Jim is not too happy about them, and they will fail after the next upgrade.

Instead I provided a mod which anyone can use in the theme editor. Note that you must make the mod in each of your themes.

I've added the links to my board, thanks for the suggestion. :) But they can work only in the index_header template:

Attached Image (viewed 63 times):

index_header_only.png

Back To Top PM Quote Reply

 Posted: Sat Jun 26th, 2010 10:30 am
  PM Quote Reply
9th Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
I like it also in the index header like you have it and will try again. Thanks

Back To Top PM Quote Reply  

 Posted: Sat Jun 26th, 2010 12:33 pm
  PM Quote Reply
10th Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
OK this worked GREAT putting it on the Home Page. Looks like this:




Next question - How do I put those same 2 new buttons on my "New Posts" page in the same place? This page - http://www.watchfreeks.com/index.php?show=recent OR IN THE QUICK LINKS drop down menu so it would be on top of every page?

Thank you!

Last edited on Sat Jun 26th, 2010 01:15 pm by TVDinner

Back To Top PM Quote Reply

 Posted: Sat Jun 26th, 2010 04:30 pm
  PM Quote Reply
11th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
TVDinner wrote:Next question - How do I put those same 2 new buttons on my "New Posts" page in the same place?
Hi TVD,

The user ID isn't available in the index_active_topics_header template.

All things are possible, but this requires a mod to the index.php file. I can provide the code, but Jim may not approve, and it will almost certainly be lost after the coming upgrade.

p.s. I can see the new buttons when I visit your site as a guest (which then produce error messages). To hide them from guest visitors, see my earlier post.

regards,

Martin.

Back To Top PM Quote Reply  

 Posted: Sat Jun 26th, 2010 05:24 pm
  PM Quote Reply
12th Post
wingnutter
Forever Learning


Joined: Wed May 14th, 2008
Location: Ireland
Posts: 1843
Status: 
Offline
Mana: 
User Gallery
Thanks Martin. This partially worked for me in the theme I tested, but the two buttons are sitting on top of the Forums/Selected/Popular/Recent/Mark all forums, I would prefer them to be beside them on the same line as James had it.

Back To Top PM Quote Reply

 Posted: Sat Jun 26th, 2010 05:39 pm
  PM Quote Reply
13th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
Hi TVD,

It's only one extra line, so here it is. :)

USE THIS ENTIRELY AT YOUR OWN RISK -- the index.php file is critical and if you mess it up your entire board will be wrecked.

In index.php find these lines (search for index_active_topics_header):


      "page_title"       => BOARD_NAME,
      "main_menu"        => main_menu(),
      "current_location" => BOARD_NAME,
      "pop_ups"          => generate_user_popups($user_menus),
      "board_name"       => BOARD_NAME,
      "show"             => $vars["show"]);

   echo(create_list_header($vars["sort_by"], BASE_DIR . "/index.php?$show_what&sort_by=\$sort_by", $other_vars, "index_active_topics_header"));

   echo $output;


and insert these lines in red where shown:


      "page_title"       => BOARD_NAME,
      "main_menu"        => main_menu(),
      "current_location" => BOARD_NAME,
      "pop_ups"          => generate_user_popups($user_menus),
      "board_name"       => BOARD_NAME,

// FREEKS BEGIN

  "mark_all_read"        => USER_ID,

// FREEKS END

      "show"             => $vars["show"]);

   echo(create_list_header($vars["sort_by"], BASE_DIR . "/index.php?$show_what&sort_by=\$sort_by", $other_vars, "index_active_topics_header"));

   echo $output;


Save and upload the modified index.php file. You can then copy and paste the same code which you used in the index_header template into the index_active_topics_header template. The same buttons will then work in the Recent Posts pages.

The // FREEKS lines are optional comments which will help you diff the files when you get the next board upgrade.

regards,

Martin.

Back To Top PM Quote Reply  

 Posted: Sat Jun 26th, 2010 05:45 pm
  PM Quote Reply
14th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
wingnutter wrote: Thanks Martin. This partially worked for me in the theme I tested, but the two buttons are sitting on top of the Forums/Selected/Popular/Recent/Mark all forums, I would prefer them to be beside them on the same line as James had it.
Hi Steve,

Post the relevant lines of your actual template code and I will mark it up for you.

Everyone's theme is different (mine certainly is :)) so it's difficult to provide code which will work for all.

Do you want the buttons style, or plain text links like mine?

Attached Image (viewed 47 times):

index_header_only.png

Back To Top PM Quote Reply

 Posted: Sat Jun 26th, 2010 09:15 pm
  PM Quote Reply
15th Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
martin_wynne wrote: TVDinner wrote:Next question - How do I put those same 2 new buttons on my "New Posts" page in the same place?
Hi TVD,

The user ID isn't available in the index_active_topics_header template.

All things are possible, but this requires a mod to the index.php file. I can provide the code, but Jim may not approve, and it will almost certainly be lost after the coming upgrade.

p.s. I can see the new buttons when I visit your site as a guest (which then produce error messages). To hide them from guest visitors, see my earlier post.

regards,

Martin.



Martin
When I use the other code it does not show - for example this

!site_header
!button_set_start
!tab_selected($tab_caption='<a class="navbutton" href="/forum/">%forums</a>')
!tab($tab_caption='<a class="navbutton" href="/forum/selected.html">%selected_topics</a>')
<!-- !tab($tab_caption='<a class="navbutton" href="/forum/popular.html">%popular_topics</a>') -->
!tab($tab_caption='<a class="navbutton" href="/forum/recent.html">New Posts</a>')
?mark_all_read('<a class="navbutton" href="/forum/view_user.php?id=$mark_all_read&posts=1">My Posts</a>':'')
!tab($tab_caption='<a class="navbutton" href="/forum/view_user.php?id=$mark_all_read&topics_started=1">My Started Topics</a>')
<td class="clean"width="100%">&nbsp;</td>
?mark_all_read('!tab($tab_caption='<a class="navbutton" href="/forum/index.php?mark_all_read=1">%mark_all_forums_read</a>')':'')
!button_set_end
!start_sidebar


This code works for members logged in on the home page, but like you said guests see an error if they click, which makes sense.

!site_header
!button_set_start
!tab_selected($tab_caption='<a class="navbutton" href="/forum/">%forums</a>')
!tab($tab_caption='<a class="navbutton" href="/forum/selected.html">%selected_topics</a>')
<!-- !tab($tab_caption='<a class="navbutton" href="/forum/popular.html">%popular_topics</a>') -->
!tab($tab_caption='<a class="navbutton" href="/forum/recent.html">New Posts</a>')
!tab($tab_caption='<a class="navbutton" href="/forum/view_user.php?id=$mark_all_read&posts=1">My Posts</a>')
!tab($tab_caption='<a class="navbutton" href="/forum/view_user.php?id=$mark_all_read&topics_started=1">My Started Topics</a>')
<td class="clean"width="100%">&nbsp;</td>
?mark_all_read('!tab($tab_caption='<a class="navbutton" href="/forum/index.php?mark_all_read=1">%mark_all_forums_read</a>')':'')
!button_set_end
!start_sidebar

Last edited on Sat Jun 26th, 2010 09:19 pm by TVDinner

Back To Top PM Quote Reply  

 Posted: Sat Jun 26th, 2010 09:40 pm
  PM Quote Reply
16th Post
wingnutter
Forever Learning


Joined: Wed May 14th, 2008
Location: Ireland
Posts: 1843
Status: 
Offline
Mana: 
User Gallery
I hope thsi works Martin;

 

!site_header
!start_sidebar

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" class="clean" width="100%">
<table width="100%" cellpadding="0" cellspacing="0" class="drwTable drwTableNoBottomBorder">

<tr class="drwDarkYellow">
<td valign="middle" align="center">
<strong>Steve Saunders Goldwing Forums</strong>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" class="drwTable drwTableNoBottomRow">

<tr class="drwDarkYellowLight">

<td>
!button_set_start
!tab_selected($tab_caption='<a class="drwnavbutton" href="/forum/">%forums</a>')
!tab($tab_caption='<a class="drwnavbutton" href="/forum/selected.html">%selected_topics</a>')
!tab($tab_caption='<a class="drwnavbutton" href="/forum/popular.html">%popular_topics</a>')
!tab($tab_caption='<a class="drwnavbutton" href="/forum/recent.html">%recent_topics</a>')
<a class="navbutton" href="/forum/view_user.php?id=$mark_all_read&posts=1">My Own Posts</a>
<a class="navbutton" href="/forum/view_user.php?id=$mark_all_read&topics_started=1">My Own Topics</a>
?mark_all_read('!tab($tab_caption='<a class="drwnavbutton" href="/forum/index.php?mark_all_read=1">%mark_all_forums_read</a>')':'')
!button_set_end

</td></tr></table>

</td>
</tr>
</table>

Back To Top PM Quote Reply

 Posted: Sat Jun 26th, 2010 09:42 pm
  PM Quote Reply
17th Post
TVDinner
Go UCONN!


Joined: Wed May 9th, 2007
Location: North Carolina USA
Posts: 1618
Status: 
Offline
Mana: 
User Gallery
you need to add !tab($tab_caption=' before each line and ') at the end

Back To Top PM Quote Reply  

 Posted: Sat Jun 26th, 2010 10:48 pm
  PM Quote Reply
18th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
TVDinner wrote:When I use the other code it does not show
Hi TVD,

That was all a bit garbled. :)

Start again -- remove everything you have added. Then find the line:

<td class="clean" width="100%">&nbsp;</td>

and immediately above it insert these two lines:

?mark_all_read('!tab($tab_caption='<a class="navbutton" href="$ base_dir/view_user.php?id=$mark_all_read&posts=1">My Posts</a>')':'')

?mark_all_read('!tab($tab_caption='<a class="navbutton" href="$ base_dir/view_user.php?id=$mark_all_read&topics_started=1">My Started Topics</a>')':'')


Note that each of these two lines must begin on the extreme left and must be all on one line.

Important: on each line remove the space between $ and base which is needed only here to defeat this forum. For the same reason, do not copy and paste back the code which you posted here, which this forum has corrupted.

regards,

Martin.

Back To Top PM Quote Reply

 Posted: Sat Jun 26th, 2010 11:00 pm
  PM Quote Reply
19th Post
martin_wynne
Licence Holder


Joined: Sun May 25th, 2008
Location: West Of The Severn, United Kingdom
Posts: 1819
Status: 
Offline
Mana: 
User Gallery
wingnutter wrote: I hope this works Martin
Hi Steve,

David has created your own nav button class, so you need to change that, like this:
 
Find the line:

!tab($tab_caption='<a class="drwnavbutton" href="$ base_dir/recent.html">%recent_topics</a>')

and immediately below it insert these two lines:

?mark_all_read('!tab($tab_caption='<a class="drwnavbutton" href="$ base_dir/view_user.php?id=$mark_all_read&posts=1">My Posts</a>')':'')

?mark_all_read('!tab($tab_caption='<a class="drwnavbutton" href="$ base_dir/view_user.php?id=$mark_all_read&topics_started=1">My Started Topics</a>')':'')


Note that each of these two lines must begin on the extreme left and must be all on one line.

Important: on each line remove the space between $ and base which is needed only here to defeat this forum. For the same reason, do not copy and paste back any of the code which you posted here, which this forum has corrupted.

regards,

Martin.

Back To Top PM Quote Reply  

 Posted: Sat Jun 26th, 2010 11:31 pm
  PM Quote Reply
20th Post
wingnutter
Forever Learning


Joined: Wed May 14th, 2008
Location: Ireland
Posts: 1843
Status: 
Offline
Mana: 
User Gallery
Thanks very much Martin and James, this is a very useful addition. James method also worked before I seen your reply, so I updated it with yours and that works fine too.

I slightly changed the text on the buttons to the text you used.

Attached Image (viewed 54 times):

newbuttons2.jpg

Last edited on Sat Jun 26th, 2010 11:45 pm by wingnutter

Back To Top PM Quote Reply

Current time is 10:18 am Page:    1  2  Next Page Last Page    
UltraBB Forums > UltraBB > Software Assistance > "My Posts" Link Top



Hosting

UltraBB 1.17 Copyright © 2007-2011 Data 1 Systems, INC.
Page processed in 0.2893 seconds (10% database + 90% PHP). 35 queries executed.