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)
-   -   mYvBindex v3.1 (https://vborg.vbsupport.ru/showthread.php?t=44691)

MartynJ 12-24-2002 10:57 PM

Hello, this hack is working great so far (basically ironing out config probs on localhost before uploading to main site), one or two things I'd like to do/suggest. Would it be possible to have "Add news item" available in the Admin CP? Or perhaps a nice and simple link in the postbit that moves copies any thread to the (hidden) news forum (though I think I'd work on that one myself.)

The other thing I'd like to do is have the forumhome (below news items) as it is in default vB. If you look at the image, you'll see what I mean. Anyone know which parts of code and templates I should copy across to make that work?

EDIT: The clickable link in the postbit: I had this down:

PHP Code:

<a href="postings.php?action=move&forumid=14&method=copy&s=$session[sessionhash]&threadid=$post[threadid]">#</a> 

And as soon as I click it, I am prompted to select where I want to move it to (though my news forum is hidden and thus not selectable on the drop down). Is there any way to keep the news forum hidden (even from mods/admin) and yet allow the moving of threads this way?

Iezugod 12-25-2002 01:51 AM

Ok, I have some questions..

first, the link:

www.crystalchronicle.com/myvbindex.php

I want to move alot of the stuff on the left, to the right.

Second:

The site is based off of an RPG Game, and I need to have stuff like:

Walkthroughs
Strategy
Characters
Items
Weapons
Levels
Creatures

And so on, and then have them link to pages that have all that info.

Question is... How do I do that?

Tigga 12-25-2002 07:24 AM

Tony - Were you upgrading or doing a fresh install? Does it work when you post a new thread in your news forum? Here's the quckest, easiest way I can tell you to fix them for now. Just log into phpMyAdmin and run the following query:

UPDATE post SET isnews='Y' WHERE postid=XX;

XX would be the post id for your news post. You can find that easily by holding the mouse over the "edit" or "quote" buttons for that post and looking in your browsers status bar. At the end of the link you will see "postid=XX". Running that query for each news post will fix the problem for now.


Marty - Adding news through the Admin CP, adding the link to the postbit, and adding the forums homepage under the news would require a little hacking. I can most likely tell you what to change, but it might be a day or two since it's the holidays. ;)

Iezugod - Things can be moved around in the index template. I'm guessing you figured that out though from looking at your site. I'm not sure I follow you about adding the links... Where do you want them added? Are you saying you want to create more templates?

MartynJ 12-25-2002 06:28 PM

Quote:

Originally posted by PlurPlanet
Marty - Adding news through the Admin CP, adding the link to the postbit, and adding the forums homepage under the news would require a little hacking. I can most likely tell you what to change, but it might be a day or two since it's the holidays. ;)
If you want, I'll contine working on the news Via Postbit thing. I think it would actually be a good deal easier if it was possible to have it such that NEWS on the front page could be read from any thread in any forum, so long as "isnews" was set, thus no longer requiring the special forums. The problem I have at the moment is that with the news forum being hidden, if a user wants to add a comment, they can't since they aren't allowed to post in hidden forums. It would be far easier if the NEWS thread was in a normal forum but simply had a special property attached to it that set it apart from normal threads (such as a sticky).

MartynJ 12-25-2002 06:46 PM

Hmm, something very strange. Any thread I *start* in the news forum becomes news, but any thread I *move* to the news forum is not recognised as news. Anyone know what's causing this?

Tony DiMera 12-26-2002 04:31 PM

Quote:

Originally posted by PlurPlanet
Tony - Were you upgrading or doing a fresh install? Does it work when you post a new thread in your news forum? Here's the quckest, easiest way I can tell you to fix them for now. Just log into phpMyAdmin and run the following query:

UPDATE post SET isnews='Y' WHERE postid=XX;

XX would be the post id for your news post. You can find that easily by holding the mouse over the "edit" or "quote" buttons for that post and looking in your browsers status bar. At the end of the link you will see "postid=XX". Running that query for each news post will fix the problem for now.



It was a fresh installl. BTW I would put 17 inplace of the XX correct? If so, would i put anything inplace of where you have "Y"?

WSB 12-26-2002 06:35 PM

I got the following error. Please help me out:

Code:

Database error in vBulletin 2.2.9:

Invalid SQL: SELECT thread.threadid,thread.title,thread.replycount,thread.postusername,thread.postuserid,thread.dateline,thread.views,thread.iconid,thread.votenum,thread.votetotal,post.postid,post.pagetext,post.allowsmilie,post.showsignature,user.signature,avatar.avatarpath,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline AS avatardateline  FROM thread LEFT JOIN post USING (threadid) LEFT JOIN user ON (user.userid=post.userid) LEFT JOIN avatar ON (avatar.avatarid=user.avatarid) LEFT JOIN customavatar ON (customavatar.userid=user.userid)  WHERE thread.forumid= AND isnews='Y' GROUP BY thread.threadid ORDER BY thread.threadid DESC
mysql error: You have an error in your SQL syntax near 'AND isnews='Y' GROUP BY thread.threadid ORDER BY thread.threadid DESC ' at line 1

mysql error number: 1064

Date: Thursday 26th of December 2002 01:32:26 PM
Script: http://www.worldsoccerboard.com/myvbindex.php
Referer:


Tigga 12-26-2002 07:00 PM

Marty - The reason that posts are not appearing as news if you move them is because only posts that are started in the news forum will have the 'isnews' column updated. I should have some time later this evening or tomorrow to play with it and tell you how to change it so that a post in any forum could become news.
Quote:

The problem I have at the moment is that with the news forum being hidden, if a user wants to add a comment, they can't since they aren't allowed to post in hidden forums.
If you changed your news forum and set it so that it was not private and set "Is active?" to no, then your users would be able to reply to and read news posts, but the forum would not appear on your main forums index page.

Tony - Were the news posts made before you installed the hack? If so, then that's why the news wasn't working. It will only recognize news posts that have been posted after the hack has been installed. Either way running the query I gave you above will update the posts so they will appear on your homepage. Please re-read the instructions I gave. 17 is your fourmid, not the postid. You would need to find the postid for each news post and replace the XX in the query with that number. The 'Y' in that query should not be changed.

WSB - You have to set your News Forum ID in your admin options before it will work properly.

jarvis 12-27-2002 05:44 PM

How hard would this be to add additional boxes within the index file to accomodate:

- Links
- Afilliates
- etc.

Can I just embed the html code within the PHP file? Are the templates that are called a fixed width so that I could emulate the size with respect to what is being drawn by myvbindex?

Has anyone already added these types of fields already and not make me recreate the wheel?

I was also thinking how nice it might be to have multiple instances of myvbindex running that could link multiple news areas of a site while pulling the articles from multiple forums.

For example, main page would show general news from forum xx, but there would be a link box on the side that held different interest areas like PC Games, MAC, etc. These links would pull up another instance of myvbindex that pull articles from the related forum.

Am I just a dreamer? :surprised: :)

Tigga 12-27-2002 07:22 PM

Quote:

Originally posted by jarvis
How hard would this be to add additional boxes within the index file to accomodate:

- Links
- Afilliates
- etc.
If you'll refer to posts 194 & 196 in this thread, there are 2 different explanations on how to do that. Either of those ways will work and should be pretty simple.

Quote:

Can I just embed the html code within the PHP file? Are the templates that are called a fixed width so that I could emulate the size with respect to what is being drawn by myvbindex?
All the "boxes" are tables that have their width set to 100%, which are nested in a table cell with a with of 165. If you look in the index template for that table cell you can change the width there and that will affect all the boxes.

Quote:

I was also thinking how nice it might be to have multiple instances of myvbindex running that could link multiple news areas of a site while pulling the articles from multiple forums.

For example, main page would show general news from forum xx, but there would be a link box on the side that held different interest areas like PC Games, MAC, etc. These links would pull up another instance of myvbindex that pull articles from the related forum.

Am I just a dreamer? :surprised: :).
That wouldn't be too hard to do... Would you want to have a seperate section with all the options in the admin CP for each, or use the same admin options for all of them and just different news forum id's?


All times are GMT. The time now is 05:52 AM.

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.02466 seconds
  • Memory Usage 1,764KB
  • 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)bbcode_code_printable
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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