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)

lasto 09-19-2003 12:19 AM

yep ok but u still need to do it to phpheader

i aint installed it m8 so only going off a quick read of the install instructions.

But u deffo missing some tables thats for sure

copyninja 09-19-2003 12:24 AM

ehh.. i did it in the phpheader.. and i know im missing the tables ... i guess ill wait for Logician to respond...

Logician 09-19-2003 09:58 AM

Quote:

"mySQL error:Table 'db-name.post' doesn't exist" ..
Make sure you edited this section in phpheader.php file correctly:

PHP Code:

## Username and password to log onto your MYSQL database server
$dbusername='test'//MYSQL username
$dbpassword='pass'//MYSQL password

## Name of the MYSQL database that vbulletin data exits. 
$dbname='testdb'

Especially make sure you entered dbname correctly because the error indicates that the name you entered there is not your vbulletin database. You can check "forum/admin/config.php" to make sure what database is your vb is using.

Quote:

I use a portal system where everything has a set place in boxes etc - but in these boxes i can enter any html code i want and it works.

Now if i install this hack - i know u can mark certain posts to be shown on a front page but what commands are used on the front page to actually call this in ??
This is hard to answer. You may try to apply STEP 2 into your portal file and this may work but there is no guarentee because you are now trying to incorporate this hack to an alien script. There might be unexpected problems: For example some function names or variables names in both scripts can be same and they might clash etc.

copyninja 09-19-2003 10:20 AM

O ok so im supposed to you the same database the vB is using? ... damn im dumb lol.. i made a whole new databse for this lol, i'll change it when i come home today afterschool.

copyninja 09-19-2003 10:41 AM

ok i did what you said...

and i wrote several news threads....and when i look @ where the news is supposed to go to.. it just says

"News has been compiled in 0.0143 seconds."

and it shows no news though/

Logician 09-19-2003 10:57 AM

Quote:

Originally Posted by copyninja
ok i did what you said...

and i wrote several news threads....and when i look @ where the news is supposed to go to.. it just says

"News has been compiled in 0.0143 seconds."

and it shows no news though/

Check your phpheader.php very carefully and make sure every config applies to your board.

For instance your problem usually happens because you didn't edit the part:
PHP Code:

## News Posters' Names
## You set here which users can post news. Use their forum names and be careful about caps.
## if you want all members to post news (of course if they know the relevant tags) simply put // just in the begining of the line
$news_posters=array("Admin""Poster2"); 


copyninja 09-19-2003 11:00 AM

yes i edited that ...

PHP Code:

## News Posters' Names
## You set here which users can post news. Use their forum names and be careful about caps.
## if you want all members to post news (of course if they know the relevant tags) simply put // just in the begining of the line
$news_posters=array("Rocky""Poster2"); 


Logician 09-19-2003 11:07 AM

and checked other phpheader.php options too? Say:
PHP Code:

## Forum IDs open to News Posting
## Script will compile the news from these forums only. 
## To learn what a forum's id is, login CP, go to Forums&Moderators/Modify, Put your mouse ON forum name you want to learn its ID
## and you'll see the ID number in IE's taskbar. 
## if you want all forums to be open to news posting simply put // just in the begining of the line
$news_forums=array("1"); 


copyninja 09-19-2003 06:51 PM

Thank you very much .. i just need to change the way the news looks when posted, thank you for all the quick reposnses :)

copyninja 09-19-2003 08:06 PM

o damn sorry to double post but ... my concern is not post count of these boards lol neways...

i would like to change the format of the date in 2 ways ..

i would delete the part that says "Past Date:" because i dont need that part...

also i would like the date to read (random date) .."9/18/2003 at 'time'"

ALSO this right here may be asking alot lol so if it is you dont have accomodate this request, anyway you think you make it so that the time is in a 12hour format and then you can use am or pm ...

Logician 09-20-2003 08:59 AM

Quote:

Originally Posted by copyninja
o damn sorry to double post but ... my concern is not post count of these boards lol neways...

i would like to change the format of the date in 2 ways ..

i would delete the part that says "Past Date:" because i dont need that part...

also i would like the date to read (random date) .."9/18/2003 at 'time'"

ALSO this right here may be asking alot lol so if it is you dont have accomodate this request, anyway you think you make it so that the time is in a 12hour format and then you can use am or pm ...

edit phpheader.php, find the line:
PHP Code:

return date ("Y-d-m H:i:s"mktime($saat+$timeset$dakika$saniye$ay$gun$yil)); 

Change the "Y-d-m H:i:s" part (only that part!) according to the info here:
http://tr.php.net/date

copyninja 09-20-2003 03:45 PM

thank you

NecroSocial 03-03-2004 09:40 PM

Logician I'm trying to get the news table to match the design specs for my site's main page. I know I can get the text to layout properly however I'd like to have the option of including a graphic along-side the intro text (see the attached image for an example of what I'm trying to do). I had the idea of making a new vbcode (something like [newsimage={file}]) that could be included in news posts. However I'd like to know how to get your script to pick-up the file so I could drop it into my table as one of the news variables (££nImage££ or some such). Any ideas on how this could be accomplished?

Logician 03-04-2004 06:03 AM

Quote:

Originally Posted by NecroSocial
Logician I'm trying to get the news table to match the design specs for my site's main page. I know I can get the text to layout properly however I'd like to have the option of including a graphic along-side the intro text (see the attached image for an example of what I'm trying to do). I had the idea of making a new vbcode (something like [newsimage={file}]) that could be included in news posts. However I'd like to know how to get your script to pick-up the file so I could drop it into my table as one of the news variables (??nImage?? or some such). Any ideas on how this could be accomplished?

If you are going to use a fixed image in all news items, you can edit the new HTML code which is in phpheader.php (variable $newstablesample).

But if you want to insert a different image per news, this wouldn't easily be possible without tweaking with the hack structure.

NecroSocial 03-05-2004 03:38 PM

Yeah I'm looking to include a different image per post. I'm fully willing to tweak if you're up for showing me what to tweak. :)

seattlecane 03-07-2004 02:29 AM

very nice, solves my problems

BlackxRam 03-28-2004 08:30 AM

Is there a Vb3 version of this in the pipe!?

Logician 03-28-2004 12:32 PM

Quote:

Originally Posted by BlackxRam
Is there a Vb3 version of this in the pipe!?

nope and unlike my other hacks I'm not yet sure if I'll port this over. If someone is eager to work on this hack's VB3 porting, he can contact me.

higmet 04-02-2004 01:29 PM

the old hack works fine on my vb3 testboard

MeTaL_oRgY 04-07-2004 05:26 PM

Hey logician! How ya doing??.... well, I installed this and it works perfectly, I just need one more thing though... I want the avatar of the news poster to appear on the index of my site... is this possible withouth modifying the SQL?... if no, then its just fine :) I just wanted to ask :)

Thnx for another GREAT hack!

MeTaL_oRgY 04-09-2004 12:09 AM

hey logician... humm.. sorry for being such an annoying guy... but I think u are the only one who can help me....

first of all, I don?t care about the avatar thing anymore.... I create a news template that looks quite good :)... but I have a functionality problem...

I have my site in both, english and spanish, so I need two news scripts (I used to use fusionnews... but it was too slow to login, write the news, then logout and then do it all over again on the other script... it worked, but it was too slow...). I?ve installed this script in two different folders, noticias and news. Then installed the advanced way and post a news item on my spanish forum. worked.. perfectly... then posted on the english one.. perfect again, both showing on their respective pages. The problem came when I posted agian on the english forum, one newswriter posted and the old post dissapeared from the mainpage... I thought it may be a installation error but no. I then tried to post another news on the english forum and nothing, the post my friend created was(and still is) the only one that can be viewed on the english main page... even if I post a newer news item.. X.x...

I can post again on the spanish forum and it works perfectly... they started deleting each others [news]tags, but that was an easy tsolve problem... (just had to set "$remove_news_tag" to 0) but now I?m desperate... plz help!

here are some URLS that may be helfull:

http://zelda.wi3k.net/home2.php <-- english mainpage
http://zelda.wi3k.net/foro/forumdisplay.php?forumid=22 <-- english news forum
http://zelda.wi3k.net/home.php <-- spanish mainpage
http://zelda.wi3k.net/foro/forumdisplay.php?forumid=23 <-- spanish news forum

hope u can help me... I think the solution is to create a whole new script.. kinda... for the english news... I mean, with different variables, tags and everything.. but I?m unsure.... :)

thnx in advance and sorry for being so annoying (again)...

BTW I?ve double and triple checked the phpheader.php file of both, english and spanish and they are right. also, every post has the tags within it :o...

Logician 04-09-2004 05:20 AM

The script is designed to turn off news tags when a news is not pulled into the news page for a reason. In your example when spanish script runs, english news is not pulled since their forum id is not matched so the script deletes them.

This should fix your problem:
find:
PHP Code:

if (($remove_news_tag==1) AND ($news[$i][printable]==0)) 

and replace it as:
PHP Code:

if (($remove_news_tag==1) AND ($news[$i][printable]==0) AND inarray($news[$i][forumid],$news_forums)) 


MeTaL_oRgY 04-09-2004 04:24 PM

lol.. it didn?t.... I, the administrator, can?t post news.. I logged in as "Zeldafan" (my other news poster" and it worked... kinda... it replaced the other new with the one I posted under his name... of course I?ve checked this: $max_news=0; so I dunno what the problem is... :oops:..... again sorry for beeing so annoying :s...

[EDIT]

mmmm.. now it?s weirder.. it says: "news hve been compied in xxxxx seconds" but nothing appears!!... Oo... and the spanish one has just 1 news (there are 2 news on the forum @@....

[EDIT]

I installed all over again from start, of course, replacing the text that u gave me logician, and here?s what I get:

PHP Code:

Fatal errorCall to undefined function: inarray() in /usr/home/wi3knet/public_html/zelda/noticias/newsconfig.php on line 409 

:(......

Logician 04-09-2004 07:13 PM

sorry should be in_array not inarray

MeTaL_oRgY 04-09-2004 07:30 PM

lol, thnx, it solve the fatal error problem, but it?s not compiling the news.. I?ll try erasing the forums and creating new ones and installing all over.. I?ll tell u how it came out after :)

[EDIT]

lol, I did what stated above... english poster posted a news on english and I posted in spanish... again, spanish is working and english isn?t... english just says: "News has been compiled in 0.0535 seconds." but the news don?t appear... I did a new install (downloaded and started all over again) for both files, I erased the old forums and created new ones, what changed their ID?s.... I checked all twice and it?s not working. I think it?s the hack since it?s not created to support two different languages in two different pages.... but I dunno :ermm:

any ideas?... if it?s too much trouble just tell me and I?ll install fusionnews or something for the enlgish part.. (damn.. >.<).....

gmarik 06-17-2004 12:19 PM

Logicina,
Warning: mysql_connect(): Access denied for user: 'a0005075@localhost' (Using password: YES) in /home/logician/public_html/newsdemo/newsconfig.php on line 26
Couldnt find MYSQL!

higmet 06-17-2004 12:25 PM

check your database settings in phpheader.php

vBTotal 08-10-2004 09:35 PM

will this work for 3.x?

jalliday 02-20-2005 06:23 PM

i've installed this hack a year ago, now i've upgraded to vb3 and it still works.
great
works with vbulletin 3.06

Logician 02-20-2005 06:32 PM

Quote:

Originally Posted by jalliday
i've installed this hack a year ago, now i've upgraded to vb3 and it still works.
great
works with vbulletin 3.06

really??? even I didn't know this lol

jalliday 03-03-2005 12:35 PM

with an upgrade, it works.i didnt tried with a new install.

YoricksRequiem 03-03-2005 10:43 PM

Can we get details on how to use it for vb3? It would be awesome :D!

unit3029 12-03-2006 10:16 PM

I still use this even now in vb 3.6.4 , Fresh install :)

the only problem i have with it now is the ability to hide the tags from people who use quote.

We used to have to edit the newreply.php and add a small drop of code, however cant see where to continue doing this as the newreply.php no longer has that code or at least has changed considerably.

OLD Instructions:-

Step 4: (Optional)
What if you use news tags in a message and someone replies this message by pressing "QUOTE" in the original thread? Your news tags will be revealed to him. IF he is not authorized to send news, this is no big deal but if you want to hide them anyway, you can apply this optional hack too:

Edit newreply.php and find

Code:

$postdate=vbdate($dateformat,$postinfo[dateline]);
$posttime=vbdate($timeformat,$postinfo[dateline]);
$pagetext=htmlspecialchars($postinfo[pagetext]);


Before that add this:

Code:

$pagetext = preg_replace("/(\[)(news)(])(\r\n)*([^\"]*)(\[\/news\])/siU", "" ,$pagetext);
$pagetext = preg_replace("/(\[)(options)(])(\r\n)*([^\"]*)(\[\/options\])/siU", "" ,$pagetext);
$pagetext = preg_replace("/(\[)(intro)(])(\r\n)*([^\"]*)(\[\/intro\])/siU", "" ,$pagetext);
$pagetext = preg_replace("/(\[)(summary)(])(\r\n)*([^\"]*)(\[\/summary\])/siU", "" ,$pagetext);

Save and upload newreply.php..

If you get the time, Id appreciate an update to this :)

also do you know if its possible to hide the buttons on the advanced wysiwyg editor from specific groups ?

renalpha 12-13-2006 05:11 PM

i get an error when i try this
mySQL error:Table 'squaddes_Vbulletin.post' doesn't exist
it is in the phpmyadmin stuff
code.
Code:

<?php
#######################################################################
##
##                                        Logician NEWS Script. \\=^))
##                     
## Pulls messages having NEWS mark from your vbulletin database 
##                                and posts/inserts in your non-vb web page.
##
#######################################################################
##
## Please Edit the OPTIONS BELOW according to your config and needs:
##
#######################################################################

## Hostname or IP of your server where MYSQL database resides.
$servername='localhost';

## Username and password to log onto your MYSQL database server
$dbusername='squaddes_vbullet'; //MYSQL username
$dbpassword='********'; //MYSQL password

## Name of the MYSQL database that vbulletin data exits.
$dbname='squaddes_Vbulletin';
$dbprefix='vb1';



All times are GMT. The time now is 08:17 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.01375 seconds
  • Memory Usage 1,850KB
  • 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
  • (3)bbcode_code_printable
  • (8)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)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