Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Making Private Messages Show on Forum Home... Details »»
Making Private Messages Show on Forum Home...
Version: , by Chief Corn Chief Corn is offline
Developer Last Online: Jan 2018 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 12-06-2002 Last Update: Never Installs: 0
 
No support by the author.

here's my forum...
Forum2kTree

i'm just learning how to hack up vbulletin. as you can see in the private messages inbox category is some blank cells. i'm trying to add the date sent and who in the the "last post" cell...like how it is with the forums.

i tried $privatemessage[datesent], and $privatemessage[displayusername] which i took from the official private message page code...but no luck.

could somebody help me?

-Chief Corn

*update* i just realized that you would have to be register to see the private message category...but to give you a visual: it would look like the next main forum category but it says Private Messages and the "sub-forum" is called Inbox. the cells next to it are blank...

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-06-2002, 09:47 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

setting up a test account for us would help more i think

also du you just copy the vars into forumhome template, or have you modified index.php (you have to or it cannot work )
Reply With Quote
  #3  
Old 12-06-2002, 09:53 PM
Chief Corn Chief Corn is offline
 
Join Date: Nov 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here's a test account...

username: vbhelp
password: vbhelp

...no i didn't edit the index.php. don't know what to put.
Reply With Quote
  #4  
Old 12-06-2002, 10:03 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh, that helps

well you have to edit index.php

find this code:
PHP Code:
  eval("\$pminfo = \"".gettemplate('forumhome_pmloggedin')."\";"); 
below add:
PHP Code:
$privatemessage=$DB_site->query_first("SELECT privatemessage.*, user.username FROM privatemessage LEFT JOIN user ON (user.userid=privatemessage.fromuserid) WHERE userid=$bbuserinfo[userid] LIMIT 1 ORDER BY privatemessageid DESC"); 
now you can use the vars...
Reply With Quote
  #5  
Old 12-06-2002, 10:22 PM
Chief Corn Chief Corn is offline
 
Join Date: Nov 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

entered it exactly as you typed it...but i get a error page that says:

----------------------------------------
Invalid SQL: SELECT privatemessage.*, user.username FROM privatemessage LEFT JOIN user ON (user.userid=privatemessage.fromuserid) WHERE userid=1 LIMIT 1 ORDER BY privatemessageid DESC
mysql error: You have an error in your SQL syntax near 'ORDER BY privatemessageid DESC' at line 1

mysql error number: 1064
-----------------------------------------

tried it twice...once below that line, and once above it. i'm pretty sure this can be done...and you have it....but possibly a typo somewhere?

-Chief Corn
Reply With Quote
  #6  
Old 12-06-2002, 10:42 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try changing the end of that PHP code from

PHP Code:
ORDER BY privatemessageid DESC"); 
to:

PHP Code:
ORDER BY privatemessageid DESC LIMIT 1"); 
Reply With Quote
  #7  
Old 12-06-2002, 11:31 PM
Chief Corn Chief Corn is offline
 
Join Date: Nov 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is the new error...

---------------------------------
Invalid SQL: SELECT privatemessage.*, user.username FROM privatemessage LEFT JOIN user ON (user.userid=privatemessage.fromuserid) WHERE userid=1 ORDER BY privatemessageid DESC LIMIT 1
mysql error: Column: 'userid' in where clause is ambiguous

mysql error number: 1052
----------------------------------

-Chief Corn
Reply With Quote
  #8  
Old 12-07-2002, 06:12 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

PHP Code:
$privatemessage=$DB_site->query_first("SELECT privatemessage.*, user.username FROM privatemessage LEFT JOIN user ON (user.userid=privatemessage.fromuserid) WHERE user.userid=$bbuserinfo[userid] LIMIT 1 ORDER BY privatemessageid DESC LIMIT 1"); 
Reply With Quote
  #9  
Old 12-07-2002, 11:27 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

damn, what hav i done

hmm erwin i think asuming userid to PM-table would be better:

PHP Code:
$privatemessage=$DB_site->query_first("SELECT privatemessage.*, user.username FROM privatemessage LEFT JOIN user ON (user.userid=privatemessage.fromuserid) WHERE privatemessage.userid=$bbuserinfo[userid] ORDER BY privatemessageid DESC LIMIT 1"); 
Reply With Quote
  #10  
Old 12-07-2002, 01:34 PM
Chief Corn Chief Corn is offline
 
Join Date: Nov 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tried both of those lines and i get:

-----------------------------
Invalid SQL: SELECT privatemessage.*, user.username FROM privatemessage LEFT JOIN user ON (user.userid=privatemessage.fromuserid) WHERE user.userid=1 LIMIT 1 ORDER BY privatemessageid DESC LIMIT 1
mysql error: You have an error in your SQL syntax near 'ORDER BY privatemessageid DESC LIMIT 1' at line 1

mysql error number: 1064
------------------------------

http://forum.2ktree.com doesn't work anymore...but http://www.2ktree.com/forum does which is strange.

-Chief Corn
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:46 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
  • Page Generation 0.04325 seconds
  • Memory Usage 2,297KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete