![]() |
Rather than display a button called "search" in postbits (which finds all messages by the post's author), I'd prefer to have the word "Posts" linked to that "search" function. Example:
--------------------------------------------------------- wluke Moderator and Support Guy Registered: Aug 2000 Location: Lancaster, Ca. Posts: 3430 --------------------------------------------------------- I click on "Posts" and that = "search all messages by wluke". That part's simple. The problem is, for Unregistered users. Solution A: I'd prefer to have the word "Posts" also be linked for these posters. But I need the logic code that determines "if registered, find all messages by this user. If unregistered, display error message instead" -- similar to the message you receive if you try to display an Unregistered user's "profile". vBulletin Message This user has not registered and therefore does not have a profile to view. Try this example: login at my site www.theflow.com/forums using: username: test password: test Now go to this thread: http://www.theflow.com/forums/showth...s=&threadid=25 "General Topics" --> "Ever Notice your coffee..." I've already got the Author's name linked to their "profile". Now scroll down til you see "Unregistered" name "Andy Rooney". Click on his screename. Appropriately, you get the error message listed above: "This user has not registered and therefore does not have a profile to view." So imagine "Total Posts" being a link too. Even though the system already displays "Total Posts: N/A", I want to generate an error message that says "We have no way of searching for other messages by an Unregistered user." Solution B: Same kind of if/then evaluation of Reg or Unregistered. If registered, search for all messages by user. If unregistered, the word "Total Posts" does not display as a link. (unlike a lot of vB sites, I want to enable Unregistered posting. But at same time, I want to make it clear that there are advantages to being Registered. This helps do that.) |
In showthread.php, make $post[posts] be this:
$post[posts] = "Posts: $post[posts]"; For registered users, and "" (empty) for non registered users. |
Thanks, Ed! (I love vB --- I was hanging on a UBB board for past year and there is no comparison.... really nice integration of features on vB)
One question: Are those changes above accessable via the vB templates, or does that change need to be hard-coded inot the php file? (I am less comfortable touching the PHP files themselves) |
No, you have to edit showthread.php.
|
So here's my fix:
Make a copy of the postbit_search template and edit it to look something like this: *edit* ok you could just use this code) Code:
<a href="search.php?s=$session[sessionhash]&action=finduser&userid=$post[userid]">Posts</a>: Posts: $post[posts]</smallfont></td> to look like this: $postlink $post[posts]</smallfont></td> Then go to functions.php and add the following code directly above: // do posts from ignored users (this is around line 270 in the startbuildpostbit function) Code:
if ($post[posts]=="N/A") { Posts: 13 (as an example) and guests will have Posts:N/A . If you would like the link to look different then you must play with the <a href> tag in the if....then statement added to functions.php file. Hope I could help. Scott As I mentioned in my PM, this took me around 30 minutes to figure out and it is not even a hack. ;) |
Quote:
I'm an information and usability designer, so I request things that help novice users figure things out easier. Lots of people who already know BBSs can figure out what icons mean and how things function, but you would be amazed at the number of people who don't know what "quote" means, or how it relates to "reply", or what the difference is between "search" within postbits and "search" in the function bar at top of page. I realize there are many many happy users with vB and it is very obviously a success story -- far greater than UBB and other solutions. Better than web crossing which CNN uses, better than Delphi which Washington Post uses and on and on. Still, many people who use vB are major enthusiasts of a particular subject area, be they cars, furry animals, animation, web development, etc. And these more novice users do not find the default layouts and functioality of vB obvious. Another example is the reply-compose screen. It is very intimidating to someone who just knows how to email. This is why next-in-queue for me is to redesign its layout for my use. (see this screen shot for example: http://www.vbulletin.com/forum/attac...&postid=151211 ) My goal has been to remove any osbtacles I can find to enabling a novice user to figure out how to participate in forums. I still would love to get some hackers help with my issue re "upon logout, redirect to the page you were last on". http://www.vbulletin.com/forum/showt...threadid=23700 Thanks again, Richard |
All times are GMT. The time now is 09:24 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|