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)

Tigga 12-28-2002 09:41 PM

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.

Yea, believe me I struggled with that one for a little while before I finally figured out it was the getavatarurl function that was adding the extra query. ;)

2. Glad I could help. :)
Again, thanks for pointing that out and if you happened to notice any other small mistakes, by all means please point them out.

3. Use $ourtimenow instead.
Ahhh, I hadn't really seen that function since it's not used much at all in vB. Thanks for pointing it out, it may be helpful for future versions. :)

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)

Ahhh... Yes, you are correct about this one. I had been using that for so long and it's been so long since you've used it in vBhome that I forgot where it came from. Obviously it's the same function and idea used in vB just changed around a little, so if it bothers you that it's in there I will gladly change it.

- threads permissions
Actually that was just taken from forumdisplay.php. I believe it was PPN who posted a while ago where to find that. ;)

- latest threads
As you know that was originally a modified version of your Latest XX Threads hack. You posted a while ago that you would prefer that it was not used, so I re-wrote that part for this version. I left the main variables the same so that people would not have to completely change their templates, but that part of the code was done from scratch.

- plural function
That idea actually came from a script called openreality. I believe (though I could be wrong) that I was actually using that on my personal site before you started using it in vBhome. The idea is so simple and basic, so of course the coding is going to be very similar.

- article
Basically you copied the code and edited a little the variables to look different.

The news part is all my code (and has been since 2.0) with parts from vBulletin files used (such as the part to pull the avatars). I did however check vBhome to see how you did the part near the top which will allow you set the news variable to 0 for no limit. I was playing with that a few months ago and for some reason could not figure out how to set the news limit where 0 would be no limit. Finally I checked to see how you had done it and felt pretty dumb afterwards since I was making such a simple mistake. (basically I didn't move the LIMIT part from the query to the part above). I didn't think it was a big deal since all I figured out from looking at your code was to move the LIMIT out of the query, which I'm sure I would have realized what a dumb mistake I was making eventually.

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.

From reading the rules to posting a hack, I don't believe anything was done wrong. If so I would think an administrator would have said something by now. And I did compare the poll section again. Yes, there are quite a few changes, but the majority of the code is straight from vBulletin.

And I do apologize for being a bit rude at first, but you were wrong by saying it was adding so many queries. I couldn't understand why you were trying to say that when I knew exactly the way the script works, so I'm sure you can see why I was a bit irritated.

Tony DiMera 12-28-2002 09:43 PM

Thankjs PlurPlanet, I'll let you know how it works.

Tigga 12-28-2002 09:51 PM

jeffj - I'm not exactly sure what you mean by "hangs". Could you please explain what you mean in a little more detail?

Jarvis - You'll have to let me know how it went when you're finished. That's a very creative way to use the hack and I'd like to see the finished result. :) Note that I did not test this, but it really is quite simple so you shouldn't have any problems.

Tony DiMera 12-28-2002 09:56 PM

Itstill does the samething. Iwonder why this is happening

Tigga 12-28-2002 10:08 PM

That really is strange... I also tried going to yoursite.com/forums/admin/index.php (expecting to get the login screen) and got a page cannot be displayed error. The same with yoursite.com/forums/index.php. :confused:

Tony DiMera 12-28-2002 10:17 PM

Try it again, it should work now.

Tigga 12-28-2002 10:59 PM

Ok, the other url's work fine now. I just noticed that none of those were working, so thought that might be a problem as well.
I just uploaded the weather_install.php file to my site to double check that it was working properly and had no problems. At this point, there's really not much I can think of... You may want to compare the file sizes of the file on your hard drive and the file on your sever to make sure that the upload went though. Also be sure that the file was uploaded in ASCII and not Binary. Other than that, I can't think of any other reason it wouldn't be working. If none of that works the only other thing I can suggest is to run the queries through phpMyAdmin. Doing it that way is a little more work, but still shouldn't take more than about 10 minutes to complete.

Tony DiMera 12-28-2002 11:10 PM

on the left side it shows 3.00MB but on the right side it shows 2.96MB after it is uploaded.

Tigga 12-28-2002 11:24 PM

That sounds about right (my mistake, I forgot the size will be slightly less when uploaded in ASCII). I'm wondering if perhaps your server is having a problem handling a file that big. It doesn't seem like it should, but you never know with computers. I don't see why this would help, but you could maybe try renaming the file to something simple (like w.php) and try running that. I don't see why that would make a difference at all, but it might be worth a try. If that still doesn't work then I can only suggest to run the queries manually.

Tony DiMera 12-28-2002 11:35 PM

Ok thanks a lot

Tigga 12-29-2002 12:24 AM

No problem. Sorry the install script wasn't working for you.

Tony DiMera 12-29-2002 12:40 AM

That's ok, I did it by doing the queries in the phpmyadmin. thankyou for the vbindex and for helping me with the news and other problems, and for trying to help with the install script. BTW, I know this is most likely a little early, but what new stuff do you plan on adding in future versions?

WSB 12-29-2002 03:40 AM

PlurPlanet, thanks for your help; I got it working fine.

Is there anyway to put the first XX characters of the actual post in the latest threads section? Also, I want to be able to put "latest reply by X" in addition to "thread started by X". Thanks.

Tigga 12-29-2002 04:29 AM

WSB - Adding the last poster is pretty simple. Just open your myvbindex file and look for:
PHP Code:

$threads=$DB_site->query("SELECT threadid,title,replycount,postusername,postuserid,dateline,views".iif($showthreadicon,   ',thread.iconid','')." FROM thread WHERE open='1' AND open<>10 $iforumperms ORDER BY lastpost DESC LIMIT $maxlatethreads"); 

Replace that with:
PHP Code:

$threads=$DB_site->query("SELECT threadid,title,replycount,postusername,postuserid,dateline,views".iif($showthreadicon,   ',thread.iconid','').",lastposter FROM thread WHERE open='1' AND open<>10 $iforumperms ORDER BY lastpost DESC LIMIT $maxlatethreads"); 

Then you would add this code in your index_threadbit template where you want the last poster's name to appear:

<a href="$bburl/member.php?action=getinfo&find=lastposter&threadid =$thread[threadid]">$thread[lastposter]</a>


Putting the first XX characters of the post would require a bit of hacking and some database changes. I may be able to tell you how to do that a little later.

jarvis 12-29-2002 06:01 AM

Plur,

I implemented the changes to support multiple myvbidex calls. Things work like a charm. I am relaunching our gaming website using this method. Things are not done, but you can get a sense of how I'm using the multiple calls based on the site links.

The website is www.mhogaming.com

Works great! Great Help! Overall, top notch... thanks for the effort, and can't wait to see what else you come up with. Maybe it will be the temperature bug fix. ;)

Tigga 12-29-2002 06:13 AM

Looks good so far, though I didn't see links anywhere to the other copies of myvbindex. Did I miss something, or are they just not linked yet? :confused:

And I wish I could find a fix for the temperature in the weather part too, or at least another site to get the stats from. It works ok on my site, but I've seen too many people that it doesn't work for. :(

jarvis 12-29-2002 06:21 AM

Quote:

though I didn't see links anywhere to the other copies of myvbindex
In the site links area, there is a Counter Strike section that has a link to "Main Page". This is the reference to my second instance of myvbindex. I will follow the same format for each area I add.

Thanks again, and I'll be patient for the weather thing. :nervous:

Tigga 12-29-2002 06:26 AM

Ahhh ok. Looking very nice indeed. Hope you and your members enjoy the hack. :)

jeffj 12-29-2002 02:07 PM

I found what's causing myvbindex to hang on polls.

it's that call to get_bbarraycookie

I'm running 2.2.5 and that function does not exist in 2.2.5...

any ideas???

====================================

never mind folks. I downloaded 2.9 and grabbed the function from functions.php. The function is isolated and has little effect on any other modules, so I was able to just paste it into 2.2.5 and polls work properly now..

:)

MartynJ 12-29-2002 03:36 PM

There's something up with vB.org and I can't actually reply to this thread directly. So after editing the file manually on my own computer and trying it, I hope this actually uploads...

MartynJ 12-29-2002 03:38 PM

There's something up with vB.org and I can't actually reply to this thread directly. So after editing the file manually on my own computer and trying it, I hope this actually uploads...

(File number 2)

DarkDraco07 12-29-2002 04:51 PM

would be a challenge for someone to do this but i bet 99% of people installing this will want it:

make the myvbindex.php page stay open even though the forum is closed

MartynJ 12-29-2002 05:10 PM

What, that page stays open even though the forum is closed as in, the vBulletin options page in Admin CP is set to close the board? Hmm, that *would* be a challenge I think...

jeffj 12-29-2002 05:54 PM

Quote:

Originally posted by MartynJ
What, that page stays open even though the forum is closed as in, the vBulletin options page in Admin CP is set to close the board? Hmm, that *would* be a challenge I think...
mine does not....

MartynJ 12-29-2002 06:17 PM

The board (when closed) is still open for browsing by admins. What DarkDraco is suggesting is a reworking that allows the index to remain open to all users while the board is closed.

Tigga 12-30-2002 03:03 AM

jeffj - Thanks for pointing out the problem with vB 2.2.5. I only had versions 2.6+ to test it on so it figures problems would arise with the version right before. I'll try to find a way to work around that or add something about it in the readme file for v3.1.

I'll see if I can make a 'mini-hack' to keep the index page open when the board is turned off. I don't think it would be too hard to do.

Tony DiMera 12-30-2002 08:07 PM

I asked about handling large files on myserver and they said "FTP and e-mail do not have size restrictions"

Kamui Shirou 12-30-2002 08:07 PM

really nice hack. good work. but one problem arised.
by clicking on Change Settings in the weather box, this sql error arises. hope ya can help me out.
PHP Code:

Database error in vBulletin 2.2.9:

Invalid SQLSELECT accid,city_title FROM weather_city WHERE subdividORDER BY city_title
mysql error
You have an error in your SQL syntax near 'ORDER BY city_title' at line 1

mysql error number
1064

Date
Monday 30th of December 2002 11:00:55 PM
Script
: [url]http://www.mangaboard.com/forums/forums/weather.php?action=modifysettings[/url]
Referer: [url]http://www.mangaboard.com/myvbindex.php[/url] 


Tigga 12-30-2002 08:31 PM

Tony - It would be more your server's capability to run the large file, not the ability to ftp it. And that still may not be the reason it wouldn't work at all, just one possibility...

Kamui - I just registered on your fourm to test it and got an error too. Did the weather_install file finish running? I'm not completely sure what would be causing that error, but I'll be glad to try and help you troubleshoot. Do you know what version of PHP and MySQL you're running?

This may help...

Open your weather.php file and look for:
PHP Code:

  $current_subdiv $DB_site->query_first("SELECT subdivid FROM weather_city WHERE accid='$usersettings[accid]'");
  
$cities $DB_site->query("SELECT accid,city_title FROM weather_city WHERE subdivid=$current_subdiv[subdivid] ORDER BY city_title"); 

Replace that with:
PHP Code:

  $current_subdiv $DB_site->query_first("SELECT subdivid FROM weather_city WHERE accid='$usersettings[accid]'");
  
$currentsetting $current_subdiv[subdivid];
  
$cities $DB_site->query("SELECT accid,city_title FROM weather_city WHERE subdivid='$currentsetting' ORDER BY city_title"); 

If that doesn't work, you may want to log into phpMyAdmin and double check that your database contains the following tables - weather_city, weather_country, weather_region, weather_subdiv, weather_userdata, weather_usersettings

Tony DiMera 12-30-2002 08:44 PM

I e-mailed them asking about the capability to run a large 3 MB in size php file.

Kamui Shirou 12-31-2002 06:14 AM

i manuelly did the changes to the database cuz the install script didnt work. and i?ve downloaded that file on page 21.
i?ll try your suggestion. thankx a lot.

edit:
my database contains all tables. i did the changes in my database
once more but still doesnt work, also with your weahter.php change it causes the error

PHP Code:

Database error in vBulletin 2.2.9:

Invalid SQLSELECT countryid FROM weather_subdiv WHERE subdivid=
mysql errorYou have an error in your SQL syntax near '' at line 1

mysql error number
1064

Date
Tuesday 31st of December 2002 09:06:56 AM
Script
: [url]http://www.mangaboard.com/forums/forums/weather.php?action=modifysettings[/url]
Referer: [url]http://www.mangaboard.com/myvbindex.php[/url] 

my server runs with
PHP/4.2.3
mysql dont exactly know but this shows up in phpmyadmin
Connected with MySQL 3.23.54-log ................

PS: Does the myvbindex show up in the who?s online list?

Tigga 12-31-2002 08:21 AM

Ok, it looks like that the change does fix the first problem, but you get a new error a couple of lines down in the script. It appears something on your server doesn't like the way the script is written. Try uploading the weather.php file I have attached here. It's the exact same, except it has ' ' marks around the variables that it doesn't seem to be pulling right, which should (hopefully) fix the problem. If that doesn't work then I can most likely fix it using a different method.

mYvBindex does not show up on the Who's Online, but it's not hard to change it so it will.

Open your forum/online.php file and look for:
PHP Code:

    case 'index':
      
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";
      break; 

Right Above that Add:
PHP Code:

    case 'home':
      
$userinfo[where] = "$hometitle <a href='/index.php?s=$session[sessionhash]'>Main Index</a>";
      break; 

Then look for:
PHP Code:

  case 'index.php':
    
$userinfo[activity] = 'index';
    break; 

Directly Above that line Add:
PHP Code:

    $userinfo[activity] = 'home';
    break; 

Note that I'm assuming your myvbindex file is called "index.php" and it's in your root directory. If you've named it something else let me know as the instructions would be slightly different.

Kamui Shirou 12-31-2002 09:54 AM

ok it fixed the main prob but there still a prob arising.
when i wanna choose the german cities there“re none to select.

Tigga 12-31-2002 10:05 AM

There don't seem to be any cities to choose from, for any country. I'd reccomend logging in with phpMyAdmin and checking that your weather_city table is not empty. If so, you should run the weather_city1.sql - weather_city6.sql files there. If that table is not empty, let me know how many records it has in it.

Kamui Shirou 12-31-2002 12:11 PM

yeah i reinstalled the changes in the sql severl times now but still germany and some other didnt want to show up. i think the sql files included in the weather.zip file i downloaded are incomplet.
my weather_city table in the databse has 2.627 records

thankx for helping me ^^

Tigga 12-31-2002 12:17 PM

Yup, that would be your problem. There should be something like 37,000 cities. Where did you download the zip file from? If it wasn't from this thread, here's a link to the zip file I made - https://vborg.vbsupport.ru/attachmen...&postid=318513
You should empty your weather_city table, then be sure to run the queries in all 6 weather_city.sql files.

Kamui Shirou 12-31-2002 12:36 PM

thats exactly the one i downloaded before
i try to split it in more parts

Kamui Shirou 12-31-2002 01:13 PM

k that was the misstake. my hoster database was not gonna suck all at once. so i split them to 3000 record steps.

Wells 01-01-2003 09:53 AM

Happy New Year to all.
Please, I need help!
I do everything and everything is ok.
But myvbindex.php says
Database error in vBulletin 2.2.9:

Invalid SQL: SELECT thread.pollid, thread.open, thread.threadid, thread.replycount, poll.pollid, poll.question, poll.dateline, poll.options, poll.votes, poll.active, poll.numberoptions, poll.timeout, poll.multiple, poll.voters FROM thread LEFT JOIN poll ON (thread.pollid=poll.pollid) WHERE

etc

mysql error number: 1064

but with mysql everything is ok... So I do not know what to do...

Admin CP is ok. MySQL queries is ok, but myvbindex.php not working... [I made changes "full path to your forum on your server" correctly]

Tigga 01-01-2003 09:59 AM

Without seeing the full error I can't tell for sure, but it looks like you have the poll turned on and no Poll Fourm ID specified (or the id isn't set correctly). Double check that and if that's not the reason please post the full error message you get here.


All times are GMT. The time now is 11:34 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.02022 seconds
  • Memory Usage 1,865KB
  • 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
  • (10)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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