vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Get new Posts, but not own (https://vborg.vbsupport.ru/showthread.php?t=35708)

Wolf42 03-03-2002 10:00 PM

Get new Posts, but not own
 
This is one I requestet for myself. But it was almost easier than i though. The idea was to search for new postings, but not the own ones. Very simple. ;)

How to do:

In seach.php

Find
PHP Code:

// ###################### Start get new #######################
if ($action=="getnew") {
  
// generate query
  // do it!
  
if ($bbuserinfo[userid]!=or $bbuserinfo[lastvisit]!=0) {
    
$forumsql=getallforumsql(); 

after this insert
PHP Code:

    $usersql=" AND thread.lastposter<>'".addslashes($bbuserinfo[username])."'"

then find about 11 lines down
PHP Code:

    // get date:
    
$datesql=" AND thread.lastpost>=".$bbuserinfo[lastvisit];

    
$wheresql="1=1".$forumsql.$datesql;
    
$wheresql.=" AND thread.open<>10"

and insert this
PHP Code:

    $wheresql.=$usersql

Save and upload the file. Thats all.

Have Phun! :D

Admin 03-04-2002 11:22 AM

(a) You don't need to addslashes() to numbers -- because they simply don't have any slashes! :)

(b) You should release the hack in a text file, so users can download and save it for later. :)

Wolf42 03-04-2002 11:28 AM

Quote:

Originally posted by FireFly
(a) You don't need to addslashes() to numbers -- because they simply don't have any slashes! :)

(b) You should release the hack in a text file, so users can download and save it for later. :)

ad a: What number is the USERNAME? :confused:

ad b: done.

Admin 03-04-2002 11:34 AM

Huh? You don't need to addslashes($bbuserinfo['userid']), just use $bbuserinfo[userid] without quotes around it.

Wolf42 03-04-2002 11:43 AM

Quote:

Originally posted by FireFly
Huh? You don't need to addslashes($bbuserinfo['userid']), just use $bbuserinfo[userid] without quotes around it.
I wrote addslashes($bbuserinfo[username]) and not $bbuserinfo[userid]! It dosn't work with userid, couse in the thread-table the last poster is the username and not his/hers ID.

Admin 03-04-2002 11:44 AM

Duh... sorry, I wasn't looking carefully enough. :)

The Ghost 04-01-2002 10:25 AM

Hi,

I wants to know something: Works this Hack with Version 2.2.4?

thx

Greetz

The Ghost

Wolf42 04-03-2002 07:25 AM

Yes, it does.

The Ghost 06-02-2002 02:34 PM

hi,

thx, work's fine!! :classic:


All times are GMT. The time now is 10:28 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.01117 seconds
  • Memory Usage 1,734KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete