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)

Logician 06-22-2002 09:00 PM

Quote:

Originally posted by FrankR310

do i have to change that line to $run_time_config={string....?

$run_time variable keeps the running time of the script while our new $run_time_config variable keeps the option if this will be displayed or not. So do NOT touch that line. The line I mentioned in the bugfix message is the only line that should be changed (as you have already noticed) :)

Highlander 06-22-2002 10:00 PM

hi..logician..again i tried your third hack..and i like it again..but enough of that ..you hear that so many times..but its your great work..you handle codes like i drink water on hot days..lol..

ok..i got no bugs to report..only wishes..like every time i meet you..here..

please follow this link to see what i mean:
<a href="http://www.spieleplanet.net/news/index.php">http://www.spieleplanet.net/news/index.php</a>
there you see my old news system....its similar like yours..but not integrated in the board..its a standalone script....but what i liked there is that i could handle different categories ..cause i got english users and german users..and for every head line there was an quick link schown on the top..so all headlines are shown on the top and seen at once..,got an idea how to handle this ?..and the next thing is....to display old news on NEXT PAGES or something like this..

so another question and this is what i need to know really ..how can i make the news system like you showed on teh news pages on the beginning of this thread..(examples) ..i want to make news from FORUM ID XX in the middle....and other news Forums should be shown in side boxes..what about that..its possible to make categories like center BOx (big in the center of the page with main news..and SIDE BOXES with short news on the right or left ?..i have to define specific Forum ids for that..but i dont see any option..for example Forum ID 50 will be shown only in the side boxes ..and ForumID 10 will be shown in the center as main news..understand my idea ?

you just win the football gemae today .. gratulation !

Highlander 06-23-2002 06:55 AM

ups the URL is wrong :

http://www.spieleplanet.org/vbp/news/

Logician 06-23-2002 10:43 AM

Highlander :Unfortunately your wishes are not achievable with this script. Script can not support different categories like English or German. However if you want, you can install it to 2 different directories and use one for English News and the other for German news. This is possible.

As for old news support, it's not possible. This is not designed to be a stand-alone news script but a vb-integration so it just drags vb news tagged messages to your main page and if a message is tagged as news but not dragged to the main page, script automatically removes the news tags from it (configurable in options part). This is intentional to decrease SQL load in your server and incease script running time and because of this behavior, it's not possible to save/archive/access old news.

Again you cannot create different columns for news, script is not designed to do that either. In my site's main page only the middle column is generated by this script, the other columns are not. So if you are referring the right column in that page, it's not this script doing it, I writed an individual PHP code to handle it.

Highlander 06-23-2002 01:25 PM

okay..thx..i will dake the old news script for right side boxes....

but really it would be nice if we could define specific forums for specific teables..like FORUM1 and FORUM2 is with link or without link..so maybe it would be nice to make FORUM3 and Forum4 to define two Forum IDS for specific news .. this script is integrated in VB its the thing i searched..cause i need comments functions .. and so my news on main page and forum are the same..but for me only once written..

p.s. did you rite the seperate news script for the side boxes..could i try it maybe ´for extra news in side boxes like you got !

but really it would be nice to make a more dynamic news vb-script..with specific Forums to choosse wich are shown on the side in extra boxes..or somewhere else..maybe with other tags like [news1] news here inside[/news1]

FrankR310 06-23-2002 06:03 PM

i was thinking about how to do this as well....

couldnt i just rename one file like phpheader.php and phpheader1.php along with newsconfig.php and newsconfig1.php

then change reference to the correct file in the scripts and the news () function to news1 () function?

modify the template in phpheader

specify specific forums to pull news from for each one

then include them on the main news page?

i wanted to try this but didnt want to mess anything up as it's running so well right now...

what do you think? i have no zero knowledge on programming..just thinking things thru to see if it's possible.

thanks,
frank

futureal 06-23-2002 06:22 PM

Quick question about this news script/hack: Is it possible to define a range of dates to display on a page (such as a site News page) with this?

In other words, suppose I want my site's home page to display all news messages newer than one month ago. Then I have another page (say, Archive) that will display all news posts for May, one for all on April, one for all of March, etc.

Would that work? I read through the documentation and either didn't see that info, or totally missed it. If it's the latter, I apologize.

Logician 06-23-2002 06:59 PM

@Frank: All you suggested may be done but it will be pointless because both scripts (newsconfig.php and newsconfig1.php) will compile the same data from the database so although you achieve to have two news columns in one page, the compiled news will be same.

To seperate the news you need to go on hacking the script and modify the news tags too. [edit: just noticed you planned to seperate forums to post news, so you can skip this step]

So it requires a lot of work but it is possible, at least in theory.

@futureal: This script is degisned to pull messages only if they are tagged as news in the original post. So if you are referring a system that the script will automatically pull the news according to post date without author's tagging them, no it's not possible. You need to insert [news] tag to pull a message to your main page and delete the tag to remove it. The script automatically deletes the tag in certain cases too but message date is not one of them.

What you want to achive can be done via the new version of my WebTemplates hack though. (Recent beta version doesnt support this feature yet). Or you may want to check other news scripts released here. I dont know if any of them support what you asked but there are nice scripts around so you can find one with that feature.

Highlander 06-26-2002 09:52 AM

Hi @all

I think i found a little bug..its not a really a bug ..but for all vbulletin owners wich got the FADE hack the news tag will make your posts fading (glowing) like links...i tried to manage this..but the fading hack sees in the news TAGS the same like [url] so the message is glowing...fading..

but only in the Forum..and i thought..maybe its not so bad..so the people see at once..thats news !

inetd 07-23-2002 07:31 PM

Logician, this hack can work with WebTemplates?

Logician 07-23-2002 07:48 PM

Quote:

Originally posted by inetd
Logician, this hack can work with WebTemplates?
nope inetd, you cant integrate this script into a webtemplate. However you can create a webquery inside your webtemplate which derives news from your vb db. Of course news compiling features of a webquery will not be as advanced as Logician News script, but can do the trick, if you dont have so high expectations.

Ryangel 07-25-2002 01:21 AM

using 2.2.6

Everything works fine :)

except that the text that i tag with [news][/news]
when i go back to view the thread, it doesnt disply.. as though it disappeared.

I will recheck code now. Just wondering if anyone had the same experiance or know a solution.

Ryangel 07-25-2002 02:13 AM

ok I added {param} in all the right places in the new vbcodes and it worked!

Did i get a bad .html install file? cuz i found it strange.

Logician 07-25-2002 05:59 AM

Quote:

Originally posted by Ryangel
except that the text that i tag with [news][/news]
when i go back to view the thread, it doesnt disply.. as though it disappeared.

lol Ryangel but this is the default behaviour of the hack. :glasses: As mentioned in the instructions ALL hack tags (ie. [news] [summary] [intro] [options]) are INVISIBLE in the original thread.

[news] tag only tags your message as a news to notify the hack and helps you to choose a custom news title for your message. It doesnt have any other usage (especially in the thread) so I dont get why you want to make it visible?

Ryangel 07-25-2002 06:02 AM

Ohhhhhhhhhhhh.

How silly of me. *whacks self*
:cross-eyed:

Ryangel 07-25-2002 06:17 AM

Thanks for the clearification logician!

and again, great addon! :)

miho 08-07-2002 05:22 AM

Is it posible to link from the news (read more...) to the orginal posting and not only to the thread. I think it is not so easy to find the right message if there are many messages in an thread.

Must be something in this line:

$news[$i][link]='[<a href="'.$forumlocation."showthread.php?threadid=". $news[$i][threadid]."&postid=".$news[$i][postid].'">'.$readresttext.'</a>]';

Thanks Michael

Logician 08-21-2002 07:33 AM

Quote:

Originally posted by miho
Is it posible to link from the news (read more...) to the orginal posting and not only to the thread.
Isnt it already so?

miho 08-21-2002 01:58 PM

No, not in vb version 2.2.3.

Logician 08-21-2002 05:31 PM

Quote:

Originally posted by miho
No, not in vb version 2.2.3.
Did I get you right:

When [summary] or [intro] tags are used in a news message you want "Read More" link to link the news message itself which [news] tag is used, not the thread itself? If it is so, this is already the default hack behaviour and it's not related to the vb version you are using.

If this is not working for you, you mignt be designed your news HTML ($newstablesample) incorrectly in "phpheader.php" file in options. You need to use ??NEWSLINK?? variable for this link.

If you can post your $newstablesample and the link of your webpage which is not working correctly, I can help more..

miho 08-22-2002 04:34 AM

Excuse me, may be i did not express everything right (I,m German).

I tried it on your Homepage.

http://www.turkhukuksitesi.com/hukuk...93&postid=5459

This link under the news on your frontpage brings me to the first post in the thread, not to the post number 5459.

Logician 08-23-2002 09:24 AM

Quote:

Originally posted by miho
I tried it on your Homepage.
http://www.turkhukuksitesi.com/hukuk...93&postid=5459

This link under the news on your frontpage brings me to the first post in the thread, not to the post number 5459.

ok you are correct and congrats you caught a small bug which has gone unnoticed for months.. :)

The fix is:

Replace:

PHP Code:

$news[$i][link]='[<a href="'.$forumlocation."showthread.php?threadid=".$news[$i][threadid]."&postid=".$news[$i][postid].'">'.$readresttext.'</a>]'

AS:

PHP Code:

$news[$i][link]='[<a href="'.$forumlocation."showthread.php?postid=".$news[$i][postid]."#post".$news[$i][postid].'">'.$readresttext.'</a>]'

Thx for bringing this to my attention..

DeadMan384AD 08-24-2002 11:02 PM

Wow great script!

Unfortunatly, for some reason It isnt parsing the code for when people use the quote tag.

The instructions say to look for:
Code:

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

but the closest I found was :
Code:

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

It should be near the top of the file right? I'm still pretty new at installing hacks. This isnt a huge problem, cause I have it limited to only a few people to post news, but its messy and I'm sure people will ask about. and then put all the uneeded tags in there...

Also, I cant get
Code:

??STATICLINK??
to work... and we like to post the full news post on the main page, rather than having a summary.

Otherwise it was a great script! Exactly what I was looking for!

edit- Forgot to mention I'm using vB 2.2.6

Logician 08-25-2002 10:59 AM

Quote:

Originally posted by DeadMan384AD
Wow great script!

Unfortunatly, for some reason It isnt parsing the code for when people use the quote tag.

The instructions say to look for:
Code:

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

but the closest I found was :
Code:

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

It should be near the top of the file right? I'm still pretty new at installing hacks. This isnt a huge problem, cause I have it limited to only a few people to post news, but its messy and I'm sure people will ask about. and then put all the uneeded tags in there...

Do you you mean "parsing the qoute tag" in news or "deleting the news tags when a news message is quoted by another member"? (Installation Step 4)

If it's the latter you are right. Seems that vb 2.2.6 made some small code changes but where you referred is correct. Just apply the code after that part and you should be fine (this is for "deleting the news tags when a news message is quoted by another member")

Quote:

Also, I cant get
Code:

??STATICLINK??
to work...
What happens when you use it?

Quote:

and we like to post the full news post on the main page, rather than having a summary.
It's upto you, dont use summary tags then..;)

If you use only [news]Title of your news[/news] tags in a message, all post will be moved to your news page..

Regards,

DeadMan384AD 08-26-2002 02:50 AM

Yup, putting the Step 4 after rather than before worked. Thanks

Like it says, the newslink doesnt appear if only the news tag is used.
but the staticlink tag turns out as:

Logician 08-26-2002 07:19 AM

Quote:

Originally posted by DeadMan384AD
Like it says, the newslink doesnt appear if only the news tag is used.
but the staticlink tag turns out as:

ok got you.. Edit phpheader.php, find:
PHP Code:

$readresttext="Read All->>"

after that add:

PHP Code:

$staticlink="Go to Post->>"

And it will work as you wished..

DeadMan384AD 08-26-2002 11:19 PM

Excellent... Thanks man!
Once again, great hack!

zonegray 09-09-2002 01:51 PM

What are the limits on the $news_posters array? I might have 30-50 users that I'd want to enable this for.

Great add-on, BTW.

Logician 09-10-2002 07:21 AM

Quote:

Originally posted by zonegray
What are the limits on the $news_posters array? I might have 30-50 users that I'd want to enable this for.

Go ahead and add them.. Since the array values are hard-coded inside the code, adding a lot of members does not effect the performance..

DeadMan384AD 09-10-2002 11:36 PM

I finally have this available to the public on my site... and it looks great! Works great too! :D I just need to get it so smilies work, but I think you mentioned it in this thread already, if not... :D

Logician 09-11-2002 07:05 AM

Quote:

Originally posted by DeadMan384AD
I finally have this available to the public on my site... and it looks great! Works great too! :D I just need to get it so smilies work, but I think you mentioned it in this thread already, if not... :D
The hack automatically parses smilies :)

zonegray 09-11-2002 11:35 AM

Quote:

Go ahead and add them..
Thanks. Seems like I should be able to modify the script so that it simply checks if the poster is a member of a certian group. Any special reason you didn't do it this way?

Also, when I post a news item, the output contains a tag
Quote:

<a name="a">
where the first intro tag was. So, when I browse in Mozilla, the whole paragraph lights up with the "hover" color when I pass the mouse over it. Anybody else notice this?

That tag is in the regular message post, BTW, not the front page text.

Logician 09-11-2002 12:55 PM

Quote:

Originally posted by zonegray

Thanks. Seems like I should be able to modify the script so that it simply checks if the poster is a member of a certian group. Any special reason you didn't do it this way?

Yes there is a reason:

The hack is coded to be a site main page script which means that it will be accessed very heavily everyday. So as to keep its performance high, I wanted to get rid of every possible SQL connection the script will make so hardcoding many things inside the code helps the code not to query your database for these information.

If I programmed it to check usergroups to decide if user is a legitimate news poster, the script will make an extra SQL connection for every news message you have in your main page. Because post table does not save usergroup of message poster but only its userid/username so we should query the user table for every news poster to decide if he is from an allowed user group. If you have 10 news in your main page, this would mean the script would make 10 more SQL queries to your board which IMO too much for a main page script.

So I dont suggest modifying the script to work with usergroups.

But if you are determined here is a work-around for you: Instead of restricting user names, restrict news forums in the settings so that news can only be posted in forum X. Also loose the poster info and let EVERYONE can post news in the scripts settings. Then all you need to do is to restrict this forum's permissions to other usergroups than your special one via vb ADmin CP. So with this trick you can make only that usergroup can post news in the main page.. ;)


Quote:

Also, when I post a news item, the output contains a tag where the first intro tag was. So, when I browse in Mozilla, the whole paragraph lights up with the "hover" color when I pass the mouse over it. Anybody else notice this? That tag is in the regular message post, BTW, not the front page text.
Oh I see.. it's a trivial issue related to the bb tag of intro we created inside Admin CP. You can change it to something like <b></b> or any other non-posting HTML code to correct the issue..

Abbas 09-11-2002 07:06 PM

Zonegray - The way I do news posting on my forum, is have an actual 'news' forum that contains only news items for the front page. We then make our news posters into moderators for this 'news' forum and make it so that only moderators can post new threads. That way, only the news posters (moderators) can start new threads but everyone can reply to the news. This is similar to other sites where you can see the news on the frontpage and it also says something like '5 replies' or '5 comments'

Logician 09-12-2002 05:37 AM

Quote:

Originally posted by Abbas
Zonegray - The way I do news posting on my forum, is have an actual 'news' forum that contains only news items for the front page. We then make our news posters into moderators for this 'news' forum and make it so that only moderators can post new threads. That way, only the news posters (moderators) can start new threads but everyone can reply to the news. This is similar to other sites where you can see the news on the frontpage and it also says something like '5 replies' or '5 comments'
If you are using my script for this and didnt restrict news posters in settings, I want to remind you that your users can still post news to your main page. Since the script does not care if news message is a thread starter or a reply, if you dont restrict news poster names, your users using news tag in the reply messages in that specific forum will be able to move their posts to your main page.. ;)

However they wouldnt know how to drag a message to the main page, so we can still say that you are safe (provided that you installed the tag remover step in installation instructions)

Abbas 09-12-2002 07:23 AM

hehe, actually I'm not using your script just yet (but hoping to soon when I give my forums a huge overhaul), I'm using one of the other news posting scripts, which just takes the first post from each thread.

Hmm... maybe you should make it so that your hack only takes the first post??? I mean when would you want a reply to become a separate post item? Seems unlikely in my opinion.

Logician 09-12-2002 07:39 AM

Quote:

Originally posted by Abbas
hehe, actually I'm not using your script just yet (but hoping to soon when I give my forums a huge overhaul), I'm using one of the other news posting scripts, which just takes the first post from each thread.

Hmm... maybe you should make it so that your hack only takes the first post??? I mean when would you want a reply to become a separate post item? Seems unlikely in my opinion.

If my hack would only take the first post as news, then why would I program it and why would the hack users use it? Other news scripts also do this.. ;) This is (and some other features) that makes my script different than others.

BTW. I dont agree it's unlikely to drag a non-first message as news. If you use [summary] tags it can be very useful to drag them. For example say you have a hot thread in forum X and you want to notify main page visitors about this thread. In your board you have to go and make a news thread in your specific forum. But in my board I can just click reply in that hot thread and write this:

Hey I dont agree you!
[news]Come Join Discussion[/news]
[summary]We are discussing if Logician's News should drag non-first posts to main page or not. click [linkme]here[/linkme]to join! [/summary]


Now all thread viewers will see only the message:

Hey I dont agree you!

in the thread and wouldnt even notice this post was a news, but in your main page a news will appear as:

We are discussing if Logician's News should drag non-first posts to main page or not. click here to join!

See the difference? ;)

zonegray 09-13-2002 11:53 AM

Thanks for the replies. Seems we could probably run one SQL query at the beginning of the script that would list the users in certain groups, and then just fill the array with the list. But, I think we have other more pressing hacks to do (we're still setting up)., so that will go on the "someday" list. If we eventually ended up with 5-6 hacks that required manual maintenace, it would be a pain, but we can deal with one for now. This hack works so well for us, since it distributes the load of maintaining the front page, meaning nobody has to be "on duty" when the news comes pouring in.

I hadn't noticed that it was possible to enable all users to post news... so we might take the approach Abbas suggested, at least to start; we'll just disable replies in the news sections. But... does anybody know of a hack that will redirect replies to a different section or something similar? The idea is to give users a "Comment" link, but one that takes them somewhere else.

zonegray 09-30-2002 12:29 PM

Just wondering... it seems I should be able to intergrate this with WebTemplates this way:

- make a copy of show.php (which would be called for pages that required news), assume it's called shownews.php.
- edit shownews.php and require/include newconfig.php
- assign output of news() to a variable, eg $newsoutput=news()
- use variable in a WebTemplate.

Obviously, I'd want to keep track of the number of queries so it didn't bog down.

Logician 09-30-2002 04:49 PM

Quote:

Originally posted by zonegray
Just wondering... it seems I should be able to intergrate this with WebTemplates this way:

I didnt try this.. On theory it looks fine.. Please let me know if it worked..


All times are GMT. The time now is 06:21 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.01464 seconds
  • Memory Usage 1,892KB
  • 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
  • (6)bbcode_code_printable
  • (4)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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