vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [RELEASE] Private Messaging 1.2.5 (https://vborg.vbsupport.ru/showthread.php?t=4405)

12-17-2000 09:17 AM

Code:

if ($table=="privatercvd") {
    $messages = $DB_site->query("SELECT msgid,toid,fromid,title,UNIX_TIMESTAMP(datetime) AS datetime,iconid,repliedto FROM $table WH
  } elseif ($table=="privatesent") {
  $messages = $DB_site->query("SELECT msgid,toid,fromid,title,UNIX_TIMESTAMP(datetime) AS datetime,iconid FROM $table WHERE fromid
  }
  if ($messages) {
  //parse each message
  while ($message=$DB_site->fetch_array($messages)) {
    $fromid = trim($message[fromid]);
    if ($ignore[$fromid]) {
      continue;
    }
    $fromuser = $DB_site->query_first("SELECT username FROM user WHERE userid=$fromid");
    $from = stripslashes(trim($fromuser[username]));
    $toid = trim($message[toid]);
    $touser = $DB_site->query_first("SELECT username FROM user WHERE userid=$toid");
    if ($table=="privatesent") {
      $from = trim($touser[username]);

I have just read through the code briefly... and have a few suggestions:
1) The part where we want to get the name of $fromuser is a new query, so the number of queries fired will be proportional to the number of PM a person gets, why not do a join ?
2) the second part, to find the $touser, afaik, this field is useful if we are at the SentItems folder? So if we are else where, those queries fired are just wasting CPU cycles?

just my 2 cents..

12-24-2000 11:36 AM

Hey,
cool hack :)
i'm using vb v1.1.3 :(

annybody has the instructions for v1.1.3 ?

becuz...
i can't find in the showthread.php:
Code:

$posts=$DB_site->query("SELECT post.dateline as dateline,post.postid as postid,post.pagetext as pagetext,
                              post.allowsmilie as allowsmilie,post.signature AS showsignature,post.title as title,
                              post.ipaddress as ipaddress,post.iconid as iconid,post.username as fakename,
                              post.userid as userid,
                              user.userid as userid,user.email as email,user.username as username,
                              user.usertitle as usertitle,user.signature as signature,user.showemail as showemail,
                              user.homepage as homepage,user.icq as icq,user.aim as aim,user.yahoo as yahoo,
                              user.joindate as joindate,user.posts as posts

only this looks like it
Code:

$posts=$DB_site->query("SELECT dateline,postid,pagetext,allowsmilie,signature AS showsignature,title,ipaddress,iconid,username,userid FROM post WHERE threadid=$threadid AND visible=1 ORDER BY dateline $postorder LIMIT $limitlower,$perpage");
please annybody help me.. thnx

12-24-2000 11:38 AM

i also cant find $userinfo=$post; in showthread.php :(

12-24-2000 01:01 PM

Why not upgrade?

12-24-2000 01:04 PM

because i installed allready a lot of hacks :(

12-26-2000 01:57 AM

Hi everyone,,

Pleas help me 24 hours only from installing PM . And now my forums not work :( .

It is gaive me this messag :


There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.







So PLEAS Any body can help :(:( .

12-26-2000 02:12 AM

Error message is... I dunno, usually... REQUIRED! :)

12-26-2000 02:29 AM

Ed Sullivan

Quote:

Error message is... I dunno, usually... REQUIRED!

Ed, Pleas I cant understand , Now 4 hours not work .

what can i do now to solve this ? :(

12-26-2000 02:06 PM

You need to tell me the actual error message you're getting. Not just that cover. Paste the email here or view the page source and you'll see it.

12-26-2000 02:17 PM

Ed , there is no email sent to me .

Because (Technical Staff,) Not linkting to any email .

if you know where i have to but my email .

Thank you Ed ,

12-26-2000 04:03 PM

"view the page source [on the error page] and you'll see it."

12-26-2000 05:07 PM

Thank you Ed for helping..

All pages make same error in main directory of vB and admin directory . All php3 files gaiv me same error !

I send you Email did you read it Ed ?

12-26-2000 08:48 PM

The pmstats table uses the name 'DATETIME' for one of the fields. This is a reserved word by MySQL and causes some versions of MySQL to not accept this. Just found this out as I was switching hosts.

The version I was using was 3.22.27
The version my host is using is: 3.22.14b-gamma-virtual

And when doing the import:

ERROR 1064 at line 195: parse error near 'datetime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
PRIMARY KEY (id)
)' at line 5

sure enough, that's where it chokes. Maybe I missed it (the documentation, except for first-time-install.txt, and I don't see it in there) in the documentation, but I don't remember seeing this as a known bug or issue.

Is there a fix out for this, or do I have to go code-hacking and change the field name and all references to it? :(

12-27-2000 12:51 AM

Yeah, that was a stupid thing I did. :) You'll have to change the name and then the references.

12-27-2000 04:01 AM

Eh, no sweat. I've done that in the source code for my site which also barfed when I moved. I never knew since I was using a newer version that allowed it.

BTW, if anyone wants to check it out, http://www.bangable.com. :)

01-02-2001 05:31 AM

I installed pm 1.2 successfully on vb 1.1.4 but I found why there is a line instead of something maybe a text or image
pls go here to see my screen capture

http://free4home.dns2go.com/~adrian/screenshoot2.gif

01-02-2001 02:59 PM

Just change the templates and edit that link (and some others too)

01-04-2001 02:26 PM

How do I install this hack on v1.1.5 ? I'm upgrading from v1.1.2 with PM v0.93 (I think) but am encountering problems a) with the differences between the code in 1.1.5 and b) the differences in the table structure between the two hacks - I run the install script provided and I get errors and it won't allow the changes to be made to the tables...

01-04-2001 02:52 PM

And before I sit down and upgrade my copy of Vbulletin 1.1.4 to 1.1.5 with pm 1.2.5 installed on 1.1.4 does 1.2.5 of pm work on 1.1.5? (if you could follow all of that)

01-05-2001 01:39 AM

For everybody who's wondering this PM DOES work with version 1.1.5 I just installed it on my board and everything seems alright, so far.... hehe =D

Check it out: http://www.gamingin3d.com/forum/

01-05-2001 03:46 AM

how did you find:
Code:

$DB_site->query("UPDATE user
                  SET password='".addslashes($password)."',email='".addslashes($email)."',
                      parentemail='".addslashes($parentemail)."',coppauser=$coppauser,homepage='".addslashes($homepage)."',
                      icq='".addslashes($icq)."',aim='".addslashes($aim)."',yahoo='".addslashes($yahoo)."',
                      biography='".addslashes($biography)."',signature='".addslashes($signature)."',adminemail=$adminemail,
                      showemail=$showemail,invisible=$invisible,cookieuser=$cookieuser,daysprune=$prunedays,
                      timezoneoffset=$timezoneoffset,emailnotification=$emailnotification
                  WHERE userid=$userid");



All times are GMT. The time now is 08:43 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.01209 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete