Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2002, 09:06 AM
Seby Seby is offline
 
Join Date: Apr 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default News Script

Hi there,

I know there have been many request for a news scripts and I also know that there are many out there, but they just don't do what I need, so I thought I'll request one
I need a newsscript that I can php include in my site, and just a news script, not like a whole portal (e.g. vbportals), I am not saying they are bad, it is just that I need only a newscript, not a portal. Next it would of course be good if it has vb powered comments. Maybe also an email to friend and print feature. Another thing that would be cool is a daily devider, so that before every days news it says "monday, 12th of august" or so (something like it is here: www.cscentral.com ).
Maybe the maker of vbportals could just release his news script stand alone, without the whole portal around it Or someone makes an addon hack for pluhnews. Would be cool if someone could make such a hack/addon.

Hope this is not to confusing,
Sebastian
Reply With Quote
  #2  
Old 05-31-2002, 10:02 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its not so hard to write something you want.

just make a new forum, where only your newsposters can open threads.

every first post in a thread would be used as a news, all other posts are the comments

do it so:

news.php:
PHP Code:
<?php
error_reporting
(7);
require(
'./global.php');

  
$news $DB_site->query("SELECT thread.title, thread.threadid, thread.iconid, thread.postusername, thread.replycount FROM thread WHERE thread.forumid = 10 ORDER BY thread.threadid DESC LIMIT 5");
  print(
"<table width='95%' align='center' cellspacing=0>");
  
$lastdate="";
  while(
$new=$DB_site->fetch_array($news)) {
    
$newstext=$DB_site->query_first("
    SELECT post.pagetext, post.dateline FROM post
    WHERE post.threadid='
$new[threadid]'
    ORDER BY postid LIMIT 1
    "
);
  
    print(
"<tr>");
if(
date("d.m.Y",$newstext[dateline])!=$lastdate) {
  print(
date("d.m.Y",$newstext[dateline])); }

$lastdate=date("d.m.Y",$newstext[dateline]);

    print(
"<th class='head' align='left' bgcolor='#".$headcolor."'><font size=1>".date("d.m.Y - H:i:",$newstext[dateline])."</font><br>".$new[title]."</th>");
    print(
"<th class='head' align='right' bgcolor='#".$headcolor."'>".$new[postusername]."<br><font size=1><a href='http://www.strategy-forum.de/showthread.php?s=&threadid=".$new[threadid]."'>Kommentare(".$new[replycount].")</a></font></th></tr>");
    print(
"<tr></tr><tr><td class=news colspan='2' bgcolor='#".$newscolor."'>".bbcodeparse2($newstext[pagetext],1,1,1,1)."</td>");
    print(
"</tr><tr><td height=5></td></tr>");
  }
  print(
"</table>");
?>
just change the forumid, and the design a bit and you have what you want
Reply With Quote
  #3  
Old 05-31-2002, 10:24 AM
Seby Seby is offline
 
Join Date: Apr 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code you showed me is what PluhNews does, I already installed it ( http://www.cscentral.com/forums/PluhNews.php ) and it does the reading and such. But it doesnt have a daily devider thing, could someone maybe code an addon hack so it does that? It would also be cool if I could modify the date format, so it doesn't sag e.g. Mon 27 May 2002, 5:39 AM, it should say only 5:39 AM since the day is already shown in the daily devider. Can anyone help?

Thanks,
Sebastian
Reply With Quote
  #4  
Old 05-31-2002, 10:34 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have updatet the code a bit, so a daily devider is included (the $lastdate if clause) you have to design it, but it is all you want.

to modify the dateformat, you have to modify the "d.m.Y"... in the datefunction, make it to your wishes
Reply With Quote
  #5  
Old 07-03-2002, 05:40 AM
ixian's Avatar
ixian ixian is offline
 
Join Date: Oct 2001
Location: Denver, CO
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this thread is a little old, but hopefully the original poster will see this:

You want Coranto. Right now. It does everything you asked and more. In fact a vbulletin comments addon was just finished after several of us tested it out over the weeks.

Not to get into the whole story, BUT - The creator of Coranto, Elvii, disappeared several months ago. Since then, the official website has gone offline with only a cryptic message saying Coranto would be released as open-source software.

Long story short, a lot of us have banded together and gotten the ball rolling. The "unofficial" site is now at:

http://coranto.gweilo.org

with forums, downloads, and more. You can download all the original Coranto files again. You can download a bugfix patch that was developed by the community (the last update Elvii made was 9 months ago, and it was still in a beta state). Best of all, there are MANY third-party addons for Coranto, and since the base program has an excellent addon-interface, installing said addons is a total snap. I can only hope vb does something like it for version 3.0 - that's how good it is.

Like I said, there is an addon for automatic vbulletin thread linking - it will automatically create a thread in the forum(s) of your choosing via the username of your choosing, create a link BACK to the news story you are linking from, etc. It will even update and/or delete the thread when you update and/or delete the news story in question.

There are many other addons as well. I did a spellchecker one that is partially based off the spellcheck hack Parker Clack posted about here. There is also a mysql addon so all your news can be database-driven (default is pulled from a flat text file, which is actually much faster for smaller sites).

I cannot say enough good things about it. Coranto is far and away the best news poster/CMS system I have used - and I am including expensive ones you have to pay for (Coranto of course is totally FREE). I use it for all the news on my site, as well as a review and article system. You can see it in action at www.maximumgamer.com - note the comments link, like I said that is all done AUTOMATICALLY with vbulletin. I'm still working on cleaning up the styles and such but you will get the idea.
Reply With Quote
  #6  
Old 07-03-2002, 10:55 AM
ForKmaN's Avatar
ForKmaN ForKmaN is offline
 
Join Date: Jan 2002
Location: Australia
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Seby
The code you showed me is what PluhNews does, I already installed it ( http://www.cscentral.com/forums/PluhNews.php ) and it does the reading and such. But it doesnt have a daily devider thing, could someone maybe code an addon hack so it does that? It would also be cool if I could modify the date format, so it doesn't sag e.g. Mon 27 May 2002, 5:39 AM, it should say only 5:39 AM since the day is already shown in the daily devider. Can anyone help?

Thanks,
Sebastian
Where can I get PluhNews?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:19 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.16612 seconds
  • Memory Usage 2,226KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete