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)

VeoMorphine 02-01-2003 05:54 PM

is there an edit i can make that lets certin usergroups use the tags insted of forum names? so insted of putting nick one i can put usergroup 6, 5 ,4

Logician 02-01-2003 08:17 PM

Quote:

Originally posted by VeoMorphine
is there an edit i can make that lets certin usergroups use the tags insted of forum names? so insted of putting nick one i can put usergroup 6, 5 ,4
Try this:
edit newsconfig.php find:

PHP Code:

select postidthreadidusernameuseriddatelinetitlepagetexticonid 
from post WHERE
visible
'1' $SQLposters AND (pagetext LIKE '%[news]%' OR pagetext LIKE '%[NEWS]%')AND (pagetext LIKE '%[/news]%' OR pagetext LIKE '%[/NEWS]%'order by dateline DESC LIMIT 500 

Replace it as
PHP Code:

SELECT p.postidp.threadidp.usernamep.useridp.datelinep.titlep.pagetextp.iconidu.usergroupid FROM post p LEFT  JOIN user u ON u.userid p.userid WHERE u.usergroupid OR u.usergroupid OR u.usergroupid ) AND visible =  '1' AND ( pagetext LIKE  '%[news]%' OR pagetext LIKE  '%[NEWS]%' ) AND ( pagetext LIKE  '%[/news]%' OR pagetext LIKE  '%[/NEWS]%' ORDER  BY dateline DESC  LIMIT 500 

Also find:
PHP Code:

select postidthreadidusernameuseriddatelinetitlepagetexticonidnews 
from post WHERE 
news
='1' AND (visible'1' $SQLposters AND (pagetext LIKE '%[news]%' OR pagetext LIKE '%[NEWS]%')AND (pagetext LIKE '%[/news]%' OR pagetext LIKE '%[/NEWS]%') ) order by dateline DESC LIMIT 500 

And replace it as:
PHP Code:

SELECT p.postidp.threadidp.usernamep.useridp.datelinep.titlep.pagetextp.iconidu.usergroupid,p.news FROM post p LEFT  JOIN user u ON u.userid p.userid WHERE news='1' AND (( u.usergroupid OR u.usergroupid OR u.usergroupid ) AND visible =  '1' AND ( pagetext LIKE  '%[news]%' OR pagetext LIKE  '%[NEWS]%' ) AND ( pagetext LIKE  '%[/news]%' OR pagetext LIKE  '%[/NEWS]%' )) ORDER  BY dateline DESC  LIMIT 500 

This is not tested but should work.. However please notice that this can increase query return time to a certain extend (especially in large dbs) as to query usergroupid we need to connect our SQL query to user table too. I can't say anything how much it will effect. You can turn on $run_time_config variable and test yourself.. For small databases it will not be a big deal anyway..

Enjoy.

Tobad 02-02-2003 04:46 PM

Yes I got it working, sorry didn't have time to post back. All I had to do was to update the path in the first line in the index.php.

From:
<?php include ('newsconfig.php');?>

To:
<?php include ('/www/t/tobad/htdocs/newsconfig.php');?>

I guess this is something new with the new version of PHP. It needs the full path.

Thanks for looking at it though.

cuba 02-05-2003 07:39 PM

hi

has anybody of you a german version of this news addon ???

thankz

cuba

cuba 02-06-2003 08:11 PM

hi logician

i've just installed your news hack, i think i have a problem with the vbcode...i've attached a printscreen...and in my index.php i get the message: no news at the moment !?!?

what's wrong?

best regards

cuba

cuba 02-07-2003 08:37 AM

@ logician

i got a problem with your hack: when i test the news vbcode in my admin cp it doesn't display a text (news) i got stripes ???

and on my index.php the message: "no news at the moment" appears !

what's wrong ???

thanks in advance for your kind help ! is it perhaps a language problem, i live in switzerland, my board is in german !?!?

regards

cuba

Logician 02-12-2003 06:36 PM

Quote:

and on my index.php the message: "no news at the moment" appears !

what's wrong ???
Have you marked any post as news by inserting [news]Title of the news[/news] tag in it?

If yes, also check the options you set in the phpheader.php file. For instance if you set $news_forums or $news_posters variables in the options, your news forum or news poster should comply with this..

DaPro 02-13-2003 07:45 PM

Hi Logician, I am a new b so I just wanted to know this:

I plan on using this script as a commenter more than a news script because I think this can work, but the problem I have is that I have different pages with different topics to comment on, so I was wondering is it possible to make certian comments go into pages? SOrry if this has been asked before, but I just wanted to know if this is possible without having to add this hack over and over. Thanks Lovely Hack!

Logician 02-14-2003 09:58 AM

Quote:

Originally posted by DaPro
Hi Logician, I am a new b so I just wanted to know this:

I plan on using this script as a commenter more than a news script because I think this can work, but the problem I have is that I have different pages with different topics to comment on, so I was wondering is it possible to make certian comments go into pages? SOrry if this has been asked before, but I just wanted to know if this is possible without having to add this hack over and over. Thanks Lovely Hack!

If I understand you correctly, nope sorry, it's not possible with this hack..

gopherhockey 02-18-2003 01:15 AM

I have a few non-vb hacks installed on our index.shtml file - last 10, recent images (from photopost) - this hack would be nice.. however, I cannot rename my index file to a .php extension as it ruins the other hacks.

Is there a way to run it under an index.shtml file?

I read the threads quickly and didn't see anything like this, which surprises me.

Thanks.


All times are GMT. The time now is 04:44 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.01202 seconds
  • Memory Usage 1,766KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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