vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Hack Help (https://vborg.vbsupport.ru/showthread.php?t=35976)

mntlcase 03-10-2002 11:53 PM

Hack Help
 
I am trying the "New Threads and New Posts" hack. However, the codes are all messed up. Can someone take the HTML stuff out and replace it with the proper PHP?

$getnewthread=$DB_site-&gt;query_first(&quot;SELECT COUNT(*) AS threads FROM thread WHERE lastpost &gt; '$bbuserinfo[lastvisit]'&quot<img src="images/newsm/wink.gif" border="0" alt="">;
$getnewpost=$DB_site-&gt;query_first(&quot;SELECT count(*) AS posts FROM post WHERE dateline &gt; '$bbuserinfo[lastvisit]'&quot<img src="images/newsm/wink.gif" border="0" alt="">;

TECK 03-11-2002 12:22 AM

here it is a good tip. go back to the author's thread and read again all the info there. it will help you learn and understand better all.
once you got the right code, post it here with an explanation how you would want to have it modified.

regards,
nakkid.

mntlcase 03-11-2002 01:21 AM

Quote:

Originally posted by nakkid
here it is a good tip. go back to the author's thread and read again all the info there. it will help you learn and understand better all.
once you got the right code, post it here with an explanation how you would want to have it modified.

regards,
nakkid.

I need to know what to replace the "&gt;" codes with. I get parse errors. &gt; is an HTML code that makes a special character like " or ) or (. Something like that.

I can't seem to find a listing of what those special HTML codes translate to in normal text.

Here is a link to the hack...

http://www.vbulletin.org/hacks/index...ack&hackid=182

TECK 03-11-2002 01:50 AM

remember what i asked you? place the code here if you want help. explain what is confusing you. i just want to give you a good method of posting that's all.

if you place just a link and say: make it work, i guarantee you nobody will answer.
hmm you are lucky there is no zip or txt file in there. i will post for you the code here, the way is should be.

PHP Code:

$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE dateline > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'"); 

regards,
nakkid.

mntlcase 03-11-2002 01:52 AM

The code is posted above. In my first message.

TECK 03-11-2002 02:29 AM

no need to thank me, btw.

regards,
nakkid.

mntlcase 03-11-2002 02:32 AM

I didn't see your post edit. I'm sorry.

Thanks for the help! :)

mntlcase 03-11-2002 02:37 AM

I just installed the code and it works perfectly!

You da man!

TECK 03-11-2002 03:03 AM

i'm glad i could help. welcome to the vB.org familly. ;)
all the best for your website.

a little tip, when you post. use [code] and [php] bbCodes to display your code. it will look alot better and easier to edit.

regards,
nakkid.


All times are GMT. The time now is 07:20 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.01350 seconds
  • Memory Usage 1,731KB
  • 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
  • (1)bbcode_php_printable
  • (1)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