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)

slideboxer 01-02-2002 01:08 AM

Is there a way I can call the news from another page, a non-vb page?

JJR512 01-02-2002 04:13 AM

slideboxer, possibly, but I'm not sure what the results would be if you just used a simple include statement...you might need to reformat the templates.

***

After having this hack in operation for a day or so on my real board, I've fixed a few minor little details that escaped me earlier. Most critical, though, is an entire group of instructions that I forgot to include, that without doing, would leave some of the features of this hack unusable. This section of the instructions adds settings to your Admin CP (in the vBulletin Options section as a new group of settings) that allow you to turn on or off vB Code support in news items, the img tag, post icons, etc. It also allows you to set the maximum length of an article, as well as how many appear on the page.

Because there were some minor modifications to the two main code files (newspost.php and homeindex.php), I have attached a new ZIP file to this post. If you have already installed the second version of this hack (posted a day ago), please upload the two main files, and follow Part 5 in the Instructions (the first four Parts are the same and can be skipped). If you have installed the original version (from the first post), please uninstall it by reversing the directions, then just start with the new version from scratch.

EDIT: Hack updated; see Post #69

The Realist 01-02-2002 09:28 AM

How can I make a already made post a news Item, I see the option when you first make a post but when I go and edit a post an option is not there?

Other than that, great hack.

Owe, the second part worked well.

JJR512 01-02-2002 04:18 PM

On the news page (homeindex.php), to only people that have permission to post news, there should appear a link that says "Create New News Item" just above the list of news items (just above the first item). You should copy the URL to the thread you want to make a news item from, then click that link, and paste the URL into the form. From there, the process is just like if you did it when you posted the thread. Please note, this only allows you to make a news item from the first post in the thread...this is a limitation that just ocurred to me, and something I may work on for a future version.

The Realist 01-02-2002 05:25 PM

Regarding the below, Ummmmmm NO!

I dont know if Im doing something wrong but the link "Create New News Item" does not appear (see attached pic)

????? Lost

:confused:


[QUOTE]Originally posted by JJR512
On the news page (homeindex.php), to only people that have permission to post news, there should appear a link that says "Create New News Item" just above the list of news items (just above the first item).

slideboxer 01-02-2002 05:29 PM

I'm having the same problem. No linkie :(

JJR512 01-02-2002 07:34 PM

In homeindex.php, please find:
PHP Code:

  $permissionssql=$DB_site->query_first("SELECT canmakenews FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]");
  
$permissions=$permissionssql[canmakenews];
  if (
$permissions==1) {
    eval(
"\$showcreatelink = \"".gettemplate("main_news_showcreatelink")."\";");
  } else {
    
$showcreatelink="";
  } 

And change this to:
PHP Code:

  $permissions=$DB_site->query_first("SELECT canmakenews FROM usergroup WHERE usergroupid=$bbuserinfo[usergroupid]");
  if (
$permissions[canmakenews]==1) {
    eval(
"\$showcreatelink = \"".gettemplate("main_news_showcreatelink")."\";");
  } else {
    
$showcreatelink="";
  } 

Also, please make sure that you installed the template main_news_showcreatelink with the contents from the text file of the same name, and that your usergroup permissions are set to allow posting news items.

The corrected homeindex.php is also in the ZIP file in the previous attachment.

The Realist 01-02-2002 08:06 PM

main_news_showcreatelink

I cannot find this template in my downloaded version?

JJR512 01-02-2002 08:39 PM

OK, sorry about that! That was a change I made to homeindex.php, to use a template for the link rather than having it hardcoded in the file. But I forgot to include the new template.

The new template is in the attached ZIP. Please add the new template, also please UPDATE the template main_newindex because it has changed as well (I moved the link to below the news items rather than above it, for cosmetic reasons; you do not have to make this change if you'd rather have the link above). May as well also re-upload the two .php files, too.

UPDATE: This hack has been updated, as mentioned below in Post #81, where the attachment is now located.

The Realist 01-02-2002 09:32 PM

I have another problem.

When I say yes to "Can post news items" the option called "Can post news items" changes to No and does the opposite if I say No it chages to yes.

Is this suposed to happen?

Also the option "Can post news items" never stays ticked when saved.

Strange?

:confused:


All times are GMT. The time now is 01:10 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.01262 seconds
  • Memory Usage 1,747KB
  • 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