vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Any-forum News hack (https://vborg.vbsupport.ru/showthread.php?t=33314)

JJR512 01-07-2002 03:59 PM

The Realist, I don't know what to tell you...there's no logical reason it should work one minute, but not the next, unless it was some kind of problem that everyone was having. I don't have it, I know another website that uses this and they don't have it... If you'd like to discuss it further, please contact me via PM or email. I might like to look at your database or try posting a news item myself.

***

This hack has been updated to have the multi-page feature. This is just like a forumdisplay or showthread, so now instead of being limited to showing the most recent 10 (or whatever number you specified) news items, users can have access to older items by just going to the next page.

I will probably next try to see if I can come up with a date limiting option instead of just a hard number, so you can set it so all news items from the past day or two days or whatever show up, regardless of how many items that is.

If you already have installed the previous version, all you need to do is re-upload homeindex.php and update the main_newindex template, either with the one from the text file if you haven't modified it, or by adding $pagenav to an appropriate location (this is the variable that displays the page links).

DarkReaper 01-07-2002 11:25 PM

It'd be very helpful if you posted all updates in the main post, as well as a link to the attachment. I was re-routed 4 different times when trying to find the download... :)

slideboxer 01-08-2002 03:05 AM

When will you get the POLL function operating?

JJR512 01-08-2002 03:31 AM

Well, I just don't see that it's possible to post a poll and news item at the same time...each requires you to go to separate redirects for a setup screen. It's either one or the other. If you really want a news item from a poll thread, you should post the thread as a poll, then copy the URL and use it to make a new news item via the link on the news page.

I suppose what I need to do is put in a routine either like the one you made, which assumes that if the poll box is checked, to make it a poll and not a news item, or else the opposite version that assumes if the make news box is checked, to do that instead of making it a poll.

Comments?

slideboxer 01-08-2002 03:44 AM

What if it redirected to a template that contained the setups for both news and polls?

JJR512 01-08-2002 03:50 AM

I'm sure it's possible, it's just sounds more complicated than I want to think about right now. :stupid:

slideboxer 01-08-2002 03:55 AM

Don't let that stop you :D

Thanks for the hack, BTW.

Mutt 01-16-2002 09:35 PM

[QUOTE]Originally posted by bigmattyh
Around line 20-ish, you'll see a line like this:
PHP Code:

$gnpagetext=bbcodeparse($gnpagetext); 

After this line, insert the following code:
PHP Code:

$maxpars 2;  // The maximum number of paragraphs you want to show
$gnpagetext=ereg_replace("(<br />|\n|\r)+""\n"$gnpagetext);
$gnpagetext=ereg_replace("(\n)+""\n"$gnpagetext);
$gnparagraphs=explode("\n"$gnpagetext);
for (
$par 0; (($par $maxpars) and ($gnparagraphs[$par] <> "")); $par++) {
  
$parcache[$par]=$gnparagraphs[$par];
}
$gnpagetext implode("\n <br /><br /> \n"$parcache);
if (
$gnparagraphs[$maxpars]) {
  
$gnmorelink="<a href=\"showthread.php?s=$session[sessionhash]&threadid=$gnthreadid\">MORE »</a>";  
}
unset(
$parcache); 


TECK 01-20-2002 12:16 AM

i made this little script to automatically install(remove) the set of templates with one click of a button.

i test it and it works great. :D let me know what you think

TECK 01-20-2002 01:52 AM

here it is:


All times are GMT. The time now is 06:29 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.01167 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_php_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