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)
-   -   Logician NEWS: Drag Any Message to Your Main Page (https://vborg.vbsupport.ru/showthread.php?t=39278)

SVTBlackLight01 08-14-2003 04:10 AM

Quote:

08-12-03 at 01:59 AM soccerclue said this in Post #140
I would like to know if we drag a post to the main page, can we add picture for that post in the main page or do we need to edit the post and add the picture in order to have the picture displayed in the main page? I would like to install this one if it can have picture in it.
I would be interested in this as well.

soccerclue 08-14-2003 05:00 AM

SVTBlackLight01, I visited your forum and saw that you got a great forum and the nice news in front page with picture. Are you attaching the picture manually using HTML editor? Is the news using this hack?

SVTBlackLight01 08-14-2003 05:16 AM

Yes, the news section on the front page is manually edited. I had switched to this hack for a while because I liked having the views, posts etc. I wanted to have the pictures, though so I switched back to what I have now.

soccerclue 08-14-2003 10:34 AM

That's a nice site. Please check your PM also.

unit3029 08-16-2003 10:44 PM

great hack, will it work on vb3?

/me tries but oops we get a problem
mySQL error:Table 'deadlyf_PUB.post' doesn't exist
which it clearly does, is there a way to sort this or will this not work with vb3?

digitalJE5U5 09-07-2003 06:46 PM

Hack looks great. However Im having a small problem?
Im getting these error messages:

Notice: Use of undefined constant threadid - assumed 'threadid' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 64

Notice: Use of undefined constant lastpost - assumed 'lastpost' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 67

Notice: Use of undefined constant lastposter - assumed 'lastposter' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 68

Notice: Use of undefined constant forumid - assumed 'forumid' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 69

Notice: Use of undefined constant open - assumed 'open' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 70

Notice: Use of undefined constant views - assumed 'views' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 71

Notice: Use of undefined constant replycount - assumed 'replycount' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 72

etc.

The new table loads, but is preceded by those errors.

Any help?
Thanks,
/DJ

digitalJE5U5 09-07-2003 06:51 PM

BTW heres lines 52-72 if that helps:


$news = array();
while($tableLine = mysql_fetch_assoc($cekilen_news)) {
$tmpTableArray = array($tableLine);
$news = array_merge($news, $tmpTableArray); }
}

// Getting thread information for news articles
for ($i=0; $i<$news_number; $i++)
{
$cekilecek_thread_id=$news[$i][threadid];
$cekilen_thread=mysql_query("select lastpost, lastposter, forumid, open, views, replycount from thread where threadid=$cekilecek_thread_id");
if (mysql_error()) {echo "mySQL error:"; echo mysql_error(); exit;}
$news[$i][lastpost]=mysql_result($cekilen_thread,0, "lastpost");
$news[$i][lastposter]=mysql_result($cekilen_thread,0, "lastposter");
$news[$i][forumid]=mysql_result($cekilen_thread,0, "forumid");
$news[$i][open]=mysql_result($cekilen_thread,0, "open");
$news[$i][views]=mysql_result($cekilen_thread,0, "views");
$news[$i][replycount]=mysql_result($cekilen_thread,0, "replycount");
//getting forum name

Logician 09-07-2003 06:54 PM

it is because of error reporting settings of your PHP installations. Adding:
PHP Code:

error_reporting(7); 

(to the hack code at the beginning of it just one line below <?php)
should fix the problem..

Or you can ask your server admin and make him disable NOTICE errors in php.ini but my solution is easier.. :)

digitalJE5U5 09-07-2003 07:10 PM

I really appreciate the quick reply! Hack rocks, and support rocks!

Thanks again.
/DJ

Frzzy 09-08-2003 07:35 PM

hey hey... i don't agree...

the notice say that these constant are undefined, so it will assume their name...

look at this...

Quote:

$cekilecek_thread_id=$news[$i][threadid];
and this...

Quote:

Notice: Use of undefined constant threadid - assumed 'threadid' in c:\inetpub\wwwroot\moodle\newsconfig.php on line 64
the parser assumed [threadid] is ['threadid'] isn't it? why just replace [threadid] with ['threadid']... the notice sure will gone...

btw, disable the error on production site is the general rule, instead use an error log... but let's think... if somewhere in the app, there's some constant named [threadid] defined before this code line... i'm sure it will mess up the result...

every parser error messages are bad... [notice] is just not as bad as [error]

^_^


All times are GMT. The time now is 01:19 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.01093 seconds
  • Memory Usage 1,746KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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