vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Need help finding this hack (https://vborg.vbsupport.ru/showthread.php?t=39312)

Carthriller 06-01-2002 03:53 PM

Need help finding this hack
 
Does anyone know where I can obtain a specific hack in this vbulletin:

http://forums.asianxo.com/

The hack I am looking for is under each category, where you see the new post icon, create a new thread icon, and the subscribe icon. Any help will be greatly appreciated, thank you.

Lesane 06-01-2002 04:12 PM

https://vborg.vbsupport.ru/showthrea...threadid=35660 ;)

Carthriller 06-01-2002 06:15 PM

Thanks for the quick reply Lesane, but what about the search for newest post icon. I'm trying to find the query string that can do that that for me, but can't seem to get it to work? Any suggestions?

PET 06-01-2002 06:56 PM

Some screenshots ?

Carthriller 06-01-2002 07:44 PM

I have a link to it in the first post.

http://forums.asianxo.com/

Next to any categories are 3 icons, I want to know what the query string for the first icon(search) is? I can't figure it out to work on my site. (The two other ones are included in the hack that Lesane so graciously provided.)

Carthriller 06-01-2002 09:17 PM

Essentially I want to know when a user click on an icon, what query string will bring him to the latest post for that forum?

<a href="search.php?action=getlatest&forumid=$forum[forumid]">icon</a>, but that didn't work.

Any suggestions?

Carthriller 06-02-2002 04:19 AM

Does anyone know how to do this, please help, thanks

Lesane 06-07-2002 08:02 PM

Open root/search.php and find:

PHP Code:

// ###################### Start getsearchforums ####################### 

Add BEFORE it:

PHP Code:

// ###################### Start get latest #######################
if ($action=="getlatest") {
  
// generate query
  // do it!
  
if ($bbuserinfo[userid]!=or $bbuserinfo[lastvisit]!=0) {
    
$forumsql=" AND forumid=$forumid";

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

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

    if (
$getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE query='".addslashes($wheresql)."'")) {
      
$searchid=$getsearch[searchid];
    } else {
      
// get last search for this user and check floodcheck
      
if ($prevsearch=$DB_site->query_first("SELECT searchid,dateline FROM search WHERE ".iif($bbuserinfo[userid]==0,"ipaddress='$ipaddress'","userid=$bbuserinfo[userid]")." ORDER BY dateline DESC LIMIT 1")) {
        if (
time()-$prevsearch[dateline]<$searchfloodcheck and $searchfloodcheck!=0) { // and !ismoderator()) {
          
eval("standarderror(\"".gettemplate("error_pmfloodcheck")."\");");
          exit;
        }
      }
      
// insert query into db
      
$DB_site->query("INSERT INTO search (searchid,query,dateline,querystring,showposts,userid,ipaddress) VALUES (NULL,'".addslashes($wheresql)."',".time().",'".addslashes($query)."',0,$bbuserinfo[userid],'".addslashes($ipaddress)."')");
      
$searchid=$DB_site->insert_id();
    }


    eval(
"standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults&getnew=true&searchid=$searchid\");");
  } else {
    
$action="getdaily";
  }


Now u can use this link to get the results of a specific forum:

PHP Code:

search.php?action=getlatest&forumid=XX 

Where xx is the forumid.

As you can see on my forum i putted it in the template: "Forum Home Page Templates -> forumhome_forumbit_level1_post & forumhome_forumbit_level2_post with the following code:

PHP Code:

<a href="search.php?action=getlatest&&forumid=$forum[forumid]">Read New Posts</a

Done.

Chris M 06-07-2002 08:52 PM

Lesane...

When I made your mod, I got this error :

Parse error: parse error in /usr/local/psa/home/vhosts/wootage.net/httpdocs/forums/search.php on line 126

Satan

Chris M 06-07-2002 08:54 PM

Here are the lines...

PHP Code:

$datesql=" AND thread.lastpost>=".$bbuserinfo[lastvisit]; 

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

if (
$getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE query='".addslashes <[url]http://www.php.net/addslashes[/url]>($wheresql)."'")) { 
$searchid=$getsearch[searchid]; 
} else { 
// get last search for this user and check floodcheck 

Satan


All times are GMT. The time now is 01:41 AM.

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.01015 seconds
  • Memory Usage 1,763KB
  • 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
  • (5)bbcode_php_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
  • (10)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