![]() |
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:
|
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? |
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? |
Quote:
|
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?
|
Quote:
|
I got the following error. Please help me out:
Code:
Database error in vBulletin 2.2.9: |
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:
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. |
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: :) |
Quote:
Quote:
Quote:
|
Thanks for the quick response!!
This is truly the hack I have been looking for to integrate my site with vB!! Great job... would love to see the develpoment move forward, and oh yeah... the temp bug fixed. :classic: Anyway, regarding: Quote:
If this type of scenario could happen, I think it would truly be a web-in-the-box scenario. /me drools :knockedout: |
I made the posts after the installation of the vbindex. The thread/post id was 57 and I tried updating the query like you said and it still isn't showing up? What else can I do to fix this problem :(
|
Tony - Check to see that you edited the newthread.php and newreply.php files correctly and uploaded them, and that your news forum id is set correctly in the admin options. If all that is correct, there is no reason the news posts shouldn't be showing up. If that still doesn't work, please post the url to your site here or PM me with it. Also, did you get any kind of error in phpMyAdmin when you ran those queries? If not, then the only possible problem I can think of is you have your news forum id set wrong. What version of myvbindex and vBulletin are you running?
MartynJ & Jarvis - I'll try to help you two out with your customization as soon as I can. With the combination of the holidays, having a lot of work to do with my business, and being sick for the last 3 days, I haven't had much time to work on this. |
I am running version 3.0. it appears to be working now. I guess my ftp didn't upload the new reply and new thread scripts when I had selected them. Thanks again. BTW in the options there isn't an option to turn on or off the weather hack.
|
I knew it had to be something like that. :)
The option to turn the weather on/off will only be added when you run the weather_install.php file. I did it that way because it will produce an sql error if the weather isn't installed and you turn it on. If you do have it installed and somehow that option wasn't added let me know and I can tell you how to add it. |
Because when I try to go to the url of the weather_install.php which is in my admin folder it says pagecannot be displayed
|
Odd... The only thing I can suggest is to double check that it is uploaded to the directory and that you are going to the right URL.
|
It is correct. I also pmed you the url of the script.
|
That's really weird... I have no idea why it would give you that error if the file is in your admin folder. It shouldn't give you a "Page cannot be displayed" error if the file exists.
You could do the queries manually instead. This post has a zip file with the queries you can run though phpMyAdmin - https://vborg.vbsupport.ru/showthrea...513#post318513 Just follow the instructions in the post and that way should work. Oh, before you run the weather_template.php file though, open it and look for: $DB_site->query("INSERT INTO setting VALUES (NULL,50,'Show Weather?','showweather','0','Show the weather forcast on your homepage.','yesno','21');"); Change the '21' at the end of that to '27' |
Ok thanks, and will it automatically put the opotion inthe cp options to turn it on for the vbindex? Also could you try sending my the exact script you used to my e-mail at F_T_R@msn.com ?
|
Yes, that will add the option to turn the weather on/off. That part you need to edit in the file is actually the query that adds the option.
Do you mean the exact weather_install.php script I used, or the zip file with the manual queries? |
The exact weather_install.php file that you used for your site. Thanks again for you help.
|
Ok, well I tried to send the file but the email was returned saying it was too big. I'll just attach it here.
|
Ok MartyJ, here's at least half of what you wanted. :)
To make it so that you can make a news post in any forum: You will need to run these queries in phpMyAdmin before uploading your changed files: ALTER TABLE post DROP `isnews`; Then this query: ALTER TABLE post ADD isnews char(1) NOT NULL DEFAULT 'N'; Note that after you run those queries no news posts will be visible on your myvbindex page. This is necessary since you are in a sense completely changing the way the news part works. Create a new template called newthread_newsopt with the following content: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Open myvbindex.php and find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Open your editpost.php file and look for: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Upload the changed files and make sure you have ran the queries in phpMyAdmin. Now admins for your board will see an extra check box right under "Show Signature" with the option to make the thread news. If you don't want this option to be available to all admins let me know and I can tell you how to change who will see the option. |
jarvis - Here is how you would go about using multiple myvbindex's.
First make a copy of your myvbindex.php file and rename it to whatever you would like it to be called. In the copy, look for: PHP Code:
PHP Code:
Then look for: PHP Code:
PHP Code:
Then you will want to run the following queries with phpMyAdmin: INSERT INTO setting VALUES (NULL,50,'2nd News Forum ID','newsforum2','','The ID number of your news forum.','','31'); INSERT INTO setting VALUES (NULL,50,'2nd Polls Forum ID','pollsforum2','','The ID number of your polls forum.','','32'); That should be everything you need to do to use another myvbindex with different news and poll id's. The News & Poll ID settings will be at the bottom of your myvbindex options in the Admin CP. Then to add additional copies, you would change the number in the file modifications each time to 3, then 4, and so on. In each of the queries you should run, I marked in bold the parts that will change with each new copy. The first part marked in bold has '2nd News Forum ID'. That can say whatever you would like to distinguish which part of the forum that is for. Then the '2' that is marked in bold should be changed to 3, then 4, and so on. Then the last numbers (31 for the news query, 32 for the poll query) is the part that orders the options. Those numbers should increment for every new option, so the next copy you add should have 33 at the end of the news query, and 34 at the end of the poll query. Ok, that should be it. I tried to explain all that the best I could, so hopefully it makes sense. If you have any problems or don't understand part of it let me know. |
Quote:
You had that added before, but you decided to remove it. Also you should mention to your users that the way you have set the script, it will add at least one query for every new article you display. So if you have for instance 15-20queries (due to few options enabled) and you display 15 articles posted, your total queries will be [high]30-35[/high]. I'm sure if you enable all your options, you could endup easy with 40-50 queries easy on the front page. 40-50 queries on a busy site will kill your server, so you should be careful with the options and let the users know about it. |
Quote:
Quote:
Quote:
|
PlurPlanet-
Hi. I just checked your page, the first time it loaded there were 35 queries, the second time, 33. Yet you say max 29 queries with your script and all options enabled? |
Well if what Teck says is correct, then I would have to have more than one news post wouldn't I? My index page normally has 25 queries since I don't use all the options. If you'll look again, you'll notice a few things aren't working right now, and the reason it's displaying so many queries is because it's not caching the templates for some reason. I finally upgraded to 2.2.9 and I guess I did something wrong.
|
Btw, if you look again it's running the way it should (20 queries as guest, 25 when logged in). When I ran the vB upgrade script I guess it deleted my templates, which would explain why nothing was working right. :)
|
Aha, post 2 more articles and let me know what's happening to the no. of queries. You will see that increases every time you post a new article, because you use queries in a loop.
Cheers. PS. You still use my latest threads code. Hihi, bad boy. :p |
Quote:
|
Wow... I really like this one, i got rid of vbindex2 to put this one on...
Great job... Clicks install cloud |
Thanks Cloud. Glad you like it. :)
Here's a couple of other sites you can compare as well Teck http://killianboard.net/vbull/myvbindex.php http://www.ls6.com/ |
Quote:
Let me explain to you where are the problems: First, you use the getavatarurl() function that adds an extra query for each article you display. Second, you really need to check your code syntax. I saw several mistakes there... like for example: Code:
DESC LIMIT 1");{ I could go on and on... but you get the idea. Why not be a nice guy and ask for help instead? And also post the credit where is due? Do you want me also to post here what php code and functions you used from vbHome? |
Quote:
PHP Code:
Quote:
Quote:
PHP Code:
Quote:
|
1. Aha, I see.. I thought you did this from my previous vbHome versions (1.0 or 1.1).
Good to know you didn't make the same mistake like I did. 2. Glad I could help. :) 3. Use $ourtimenow instead. 4. So far, from what I see you got ideas from my script on the following areas: - alternate colors on threads function (old vbHome version) - threads permissions - latest threads - plural function - article Basically you copied the code and edited a little the variables to look different. 5. I removed that remark, but you were to fast for me, since is not my place to judge this but the mods here at vb.org. Sorry. However, my poll and online users code is not the vBulletin one. Feel free to compare it. |
I just installed it and the instructions are very well done...
my only problem is that myvbindex.php hangs as soon as i add the forum ID that contain the polls if that forum has a POLL or a thread in it. It does not hang if the forum is empty. - jeff |
Plur,
Thanks for the response. I will do the modifications for multiple myvbindex loads tonight. Your support has been first rate! Hope you feel better... FWIW... Teck, you really should take your comments offline. This petty conversations just seems like an attempt at one upping or proving who the better coder is. I looked at your product as well and thought it was great, but I just liked the way I could play around with the formatting in this one a bit better. It's the add-on community that continues to make vB a great product, but this mine-is-better routine is wearing thin. /me steps down off soap box. Take care! |
Yes, I'd have to agree with jarvis. It is getting quite tedious. I've something to add to this thread (attachment wise) though I can't, because every time I click the "post reply" button I get the following error message:
Fatal error: Maximum execution time of 15 seconds exceeded in /www/vbulletin.org/htdocs/forum/admin/functions.php on line 1067 Anyone else got that? |
All times are GMT. The time now is 11:32 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|