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)

dlst 01-23-2002 07:27 AM

Hi JJR512, thanks for all the hard work you've put into this.

I've installed the latest release, and have found the following problems/bugs that I haven't seen mentioned:

problem 1: SQL Error

Go to homeindex.php (stock, I have not modified it from newest release)
Click on "Create a new news item"
Without entering anything, click on "Submit thread URL"
The following error occurs:

Invalid SQL: SELECT forumid FROM thread WHERE threadid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

I guess because there is no threadid and therefore the select fails... While you're in "error-checking-mode" is there a way to verify the URL is valid, belongs to this site, etc. before continuing?

problem 2: Javascript Error in newspost.php

Start a new thread, making the thread a news item. You get redirected to newspost.php.
Click on "Submit" after making no changes to your input.
The following error occurs:

A javascript pop-up (via IE5.5) with "A run-time error has occurred, line 58 with the following error:
'subject.value' is null or not an object"

The script continues to process, and you end up at homeindex.php, but no news items show up. The page is otherwise complete, but without news items. I get the empty page you see here: http://207.235.6.72/forum/homeindex.php

problem 3: Permissions problem in forumpermission.php

If you go to the admin, under "Forums & Moderators", click on "Permissions"
If you set custom permissions for a forum here, it has the effect of DISallowing news posting privileges for the group whom you have just changed.

For example, if you click on Administrators-Edit, select "Use Custom Settings", leave ALL the settings alone, and submit... you will find that Administrators are no longer able to post news items to that board.

-------

Thanks again for this great hack.

-dlst

dlst 01-26-2002 03:28 AM

Hmmm... anybody home? Well in case anyone is reading this thread, I found the solution to the Javascipt error I found:

[QUOTE]Originally posted by dlst

problem 2: Javascript Error in newspost.php

Start a new thread, making the thread a news item. You get redirected to newspost.php.
Click on "Submit" after making no changes to your input.
The following error occurs:

A javascript pop-up (via IE5.5) with "A run-time error has occurred, line 58 with the following error:
'subject.value' is null or not an object"

[/B]

dlst 01-26-2002 03:50 AM

Man, I'm on a role... I fixed problem one (sort of). First, here's the problem (quoted from above):

[QUOTE]Originally posted by dlst
problem 1: SQL Error

Go to homeindex.php (stock, I have not modified it from newest release)
Click on "Create a new news item"
Without entering anything, click on "Submit thread URL"
The following error occurs:

Invalid SQL: SELECT forumid FROM thread WHERE threadid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

I guess because there is no threadid and therefore the select fails... While you're in "error-checking-mode" is there a way to verify the URL is valid, belongs to this site, etc. before continuing?


dlst 01-26-2002 04:37 AM

Ok fine, I'll do my own homework! Sheesh. J/K :)

As I posted above, It would be nice to have the script verify the validity of the URL and present the user with a meaningful error message... and NEVER a MySQL error. Well, it's done, with a few modifications to newspost.php.

[QUOTE]Originally posted by dlst
problem 1: SQL Error

Go to homeindex.php (stock, I have not modified it from newest release)
Click on "Create a new news item"
Without entering anything, click on "Submit thread URL"
The following error occurs:

Invalid SQL: SELECT forumid FROM thread WHERE threadid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

I guess because there is no threadid and therefore the select fails... While you're in "error-checking-mode" is there a way to verify the URL is valid, belongs to this site, etc. before continuing?


TECK 01-26-2002 04:00 PM

[QUOTE]Originally posted by slideboxer
Is there a way I can call the news from another page, a non-vb page?

slideboxer 01-26-2002 05:39 PM

Nakkid, thanks a bunch.

Mutt 01-27-2002 11:39 PM

Ok, I know you guys are all working with the new version of this hack, but I'm still using the original one and I love the results. the newer one just had too much going on. the original hack was simple and did a great job. make a post and mark it to be placed on the homepage. done and simple. I I have it ignore poll posts that have been marked as news. then copied the get news sub and have it ignore all non poll posts using differnt tempates for those.

now I have my news items donw the center, activbe topics off to the side, and polls in a small box to the side. you can vote from there or if you've already voted you see the results. I also added a modified version of the vbportal calendar and remake of the welcome panel.

anyway, just wanted to say thanks for the great any forum news hack. When I'm done with it, it's going to make for a real nice homepage

http://www.ccdv.com/forum/homeindex.php

PS - I'd still like to come up with a nice way to truncate the message without screwing up the vbcode and without this whole second post thing in the new version. bigmattyh had something that looked like it would work, but I couldn't get it to. :(

bigmattyh 01-27-2002 11:43 PM

Hey Mutt,

I think I'll go back and see if I can include a different version of the truncation process -- one that's much more flexible. Maybe tonight, or tomorrow?

Matt

slideboxer 02-01-2002 03:06 AM

I'm sure this is probably an easy fix but I'm simply no hacker - cut and paste? now that's a different story :) . I'm trying to include my welcome panel (from the welcome panel hack) in the main_newindex template. How do I get the welcome panel information to display in in this template the same way it does in the forumhome template?

Plus, any news on getting the polls to work?

SirSteve 02-01-2002 12:45 PM

Am I able to select/override what forums/subforums the "News" checkbox is in? Obviously, if I have a news forum, I don't need this checkbox to be displayed.


All times are GMT. The time now is 07:39 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.01209 seconds
  • Memory Usage 1,745KB
  • 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
  • (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