vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Top Posters List (https://vborg.vbsupport.ru/showthread.php?t=168895)

sockwater 05-14-2008 06:31 PM

Paul, it looks like the index that is added on installation is not removed when uninstalling.

Paul M 05-14-2008 06:33 PM

Correct. There is no need to remove it, and its possible it may be used by other mods.

sockwater 05-14-2008 06:56 PM

Quote:

Originally Posted by Paul M (Post 1519647)
Correct. There is no need to remove it, and its possible it may be used by other mods.

Every additional index that must be maintained makes inserting and deleting on that table more server-intensive.

IMO, if a product creates something, it should remove it upon uninstallation. However, if the user has another mod installed that also uses the index, it would be detrimental to remove it.

Perhaps there should be a way to track which mods create/use which indexes, so that they can be removed when the last mod that was using them is removed. Here's a brainstorm: Have a way to specify (in a product XML file) the non-vB-default indexes that a mod needs, containing the table, columns and index type. Then upon installation of a mod, vB would automatically create any indexes that don't exist and that the mod needs. When uninstalling, vB would check if the indexes that that mod used are not being used by any other mod, and uninstall them.

Indexes could be treated that way, as opposed to adding tables/columns, since the index is a shared item, and a new table/column for a mod is not a shared item.

lazytown 05-15-2008 09:52 PM

Paul,

Another great mod converts to 3.7 -- thank you! However, I'm having a problem with the column headings.

I'm now running 3.7 gold and I previously had installed topposters for 365 (which was working). I installed the 3.7.002 version of topposters and it auto-uninstalled the previous version. Index was created fine. However, the display of topposters is somewhat messed up now. The column headings are wrong. Attached is a screenshot. I did try to reinstall it, but the problem remains.

FYI: I have it set to display topposters for the last 1, 7, 30, and 'all time' days.

Thanks
-vissa

lazytown 05-15-2008 10:01 PM

I found the problem. I had to revert the 'topposters' template. Even when I completely uninstalled and re-installed, the old template remained.

-vissa

Paul M 05-16-2008 11:03 AM

It must have been a very old template, pre "product" days i would guess so didnt get zapped when you uninstalled the product.

beansbaxter 05-18-2008 06:10 PM

When I was running this on 3.6, I had no problems. It wont work on 3.7 - crashes.

karrerax 05-18-2008 08:05 PM

Perfect Installed

Paul M 05-18-2008 09:00 PM

Quote:

Originally Posted by beansbaxter (Post 1523865)
When I was running this on 3.6, I had no problems. It wont work on 3.7 - crashes.

Crashes ??

|Jordan| 05-20-2008 01:22 AM

YOU ARE A GOD!

I was looking for something that did this.

<3 <3 <3 Paul

Is it possible to make it only display users that have a specific custom field in their username on (in this case a radio button)?

Paul M 05-20-2008 06:43 AM

If you want to rewrite it slightly you could do that.

|Jordan| 05-20-2008 04:35 PM

I'm not too familiar with coding, i can edit but complete rewrite's are harder for me. Could i pay you?

EvilJohn 05-28-2008 06:58 AM

Installed! Works wonderfully. Thank you sir.

Joey805 06-04-2008 11:00 PM

I was running this on 3.6 and it worked fine. I just upgraded to vb 3.7 and also updated Top Posters to the latest version.

Now my column headings are missing.

I have attached a screen shot.

How do I fix this?

Paul M 06-04-2008 11:59 PM

Try installing it again, looks like missing phrases to me.

Alfa1 06-05-2008 12:49 AM

What is the difference between this mod and Cyb's mod?

Paul M 06-05-2008 01:39 AM

No idea, I dont keep track of other mods unless I actually use them.

Joey805 06-05-2008 02:03 AM

Quote:

Originally Posted by Paul M (Post 1541103)
Try installing it again, looks like missing phrases to me.

Just uninstalled it and reinstalled.

Still the same problem. What should I try next?

Paul M 06-05-2008 06:45 AM

Sorry, without admin access to your forum there is nothing more I could even guess at.

Promoking 06-07-2008 05:35 PM

Quote:

Originally Posted by Paul M (Post 1445072)
I have thought about that in the past. You can do it yourself by editing the template.

Quote:

Originally Posted by Paul M (Post 1499692)
Edit the Top_Posters_bit template.

Where are the templates found?

Also, is there a way to mod your code to show "last month" data just like and along with "this month" data? This would be soooo useful for forum posting contests and rewards which is why I am using it. Where can I go to make those kind of edits?

By the way = THANK YOU for making this. I was trying to total the info up by hand for our forum posting contests and it was terrible.

THANKS AGAIN !!!!

Paul M 06-07-2008 06:00 PM

The template is found in the style manager, same as all other templates. The one you want is "Top_Posters_bit".

To do last month would require code changes, and possible a change to the sql.

Promoking 06-07-2008 06:15 PM

Thanks Paul - I really appreciate it.

Quote:

Originally Posted by Paul M (Post 1543366)
To do last month would require code changes, and possible a change to the sql.

So... um... I guess doing that kinda coding is way beyond my skillz. Any hope you can add it?

Cheers

-Brian

PS. Idea for another mod = a page where you can run a search query specified by a date range that returns individual users/posters and the number of posts each user made within the specified date range. What do you think? Useful? Doable?

Thanks

Paul M 06-07-2008 07:58 PM

Quote:

Originally Posted by Promoking (Post 1543374)
So... um... I guess doing that kinda coding is way beyond my skillz. Any hope you can add it?

PS. Idea for another mod = a page where you can run a search query specified by a date range that returns individual users/posters and the number of posts each user made within the specified date range. What do you think? Useful? Doable?

Sorry, no changes are planned to this mod.

MorrisMcD 06-09-2008 06:23 AM

Just times out for me when installing the product... I dont even see the product listed under products installed..

Any clue? Worked great on 3.6 for me.. No database crashing here though... :)

Paul M 06-09-2008 06:51 AM

Sorry, there is no reason for this to time out other than some odd issue with your board. Have you tried again ?

MorrisMcD 06-09-2008 11:45 AM

Quote:

Originally Posted by Paul M (Post 1544770)
Sorry, there is no reason for this to time out other than some odd issue with your board. Have you tried again ?

Yes I tried it three times.. Without overwrite on.. Each time, it did the same thing. In fact, just tried it again...

Quote:

Importing Product, Please Wait...

[:]
Checking for Index
Adding Index
Never goes back to the products page.. Just sits there like so for about a min to two min and then the bottom of the page reads as done

Paul M 06-09-2008 03:08 PM

Your server is obviously taking a long time to add the index, or failing to add it for some reason. Maybe you will have to do that manually.

MorrisMcD 06-10-2008 01:45 PM

Quote:

Originally Posted by Paul M (Post 1545077)
Your server is obviously taking a long time to add the index, or failing to add it for some reason. Maybe you will have to do that manually.

How do I go about doing so? Can I try changing timeout values somewhere possibly?

Paul M 06-10-2008 05:20 PM

Quote:

Originally Posted by MorrisMcD (Post 1545880)
How do I go about doing so?

Just run the sql manually ;

[sql]ALTER TABLE post ADD INDEX (dateline)[/sql]

MorrisMcD 06-10-2008 11:47 PM

Quote:

Originally Posted by Paul M (Post 1545999)
Just run the sql manually ;

[sql]ALTER TABLE post ADD INDEX (dateline)[/sql]

Quote:

Your SQL-query has been executed successfully (Query took 62.6895 sec)
SQL-query:
ALTER TABLE post ADD INDEX ( dateline )
Did it manually.. Imported the product... same thing

I verified the dateline exists in the post table. So when installing, when it checks for the index, why does it still attempt to add it?

Paul M 06-11-2008 08:47 AM

No idea. If it sees the index it wont try and add it.

MorrisMcD 06-11-2008 01:37 PM

Quote:

Originally Posted by Paul M (Post 1546511)
No idea. If it sees the index it wont try and add it.

Welp.. If you give up, so do I... Nice feature.. Not worth the headache

And it doesn't seem I am the only one with a similar problem. Nor do I have a problem with any other products

Paul M 06-11-2008 02:25 PM

Quote:

Originally Posted by MorrisMcD (Post 1546664)
Welp.. If you give up, so do I... Nice feature.. Not worth the headache

Since I have neither access to your server or forum, there is nothing I can do. I cant just produce magic answers out of thin air. :)

Quote:

Originally Posted by MorrisMcD (Post 1546664)
And it doesn't seem I am the only one with a similar problem. Nor do I have a problem with any other products

I dont see anyone else having an issue creating the index.

How many of those "other products" create an index on (or alter) the post table, Im guessing none, since they obviously would have the same problem (the issue is mysql creating the index, not the product).

MorrisMcD 06-11-2008 03:28 PM

Quote:

Originally Posted by Paul M (Post 1546715)
Since I have neither access to your server or forum, there is nothing I can do. I cant just produce magic answers out of thin air. :)

I understand that.. And I will continue to enjoy the majority of your addons and appreciate your effort in making them.. Unfortunately this one just isn't working out.


Quote:

Originally Posted by Paul M (Post 1546715)
I dont see anyone else having an issue creating the index.

How many of those "other products" create an index on (or alter) the post table, Im guessing none, since they obviously would have the same problem (the issue is mysql creating the index, not the product).

I noticed you said something about the problem of the index being created slow and timing out in post # 28... Which is similar to my issue I guess (or at least I thought).. Weird thing is, that the index is created.. I verified it's there. Perhaps it is something on mysql, but I can't imagine what since I am having no other issues with anything whatsoever. Not really meaning to point fingers as you may have taken it that way. Just lost for a solution as I have no other symptoms to go off of

Paul M 06-11-2008 04:16 PM

If you are absolutely sure the index has been created, you can simply comment out the line in the product xml that tries to create it, it will then install (line 76 I believe). Be aware that if the index isnt created ok, you may find the top posters page slow to generate and load.

MorrisMcD 06-11-2008 05:25 PM

Quote:

Originally Posted by Paul M (Post 1546788)
If you are absolutely sure the index has been created, you can simply comment out the line in the product xml that tries to create it, it will then install (line 76 I believe). Be aware that if the index isnt created ok, you may find the top posters page slow to generate and load.

I appreciate the fact you still do want to help Paul.. I really do.. I more wanted to give up because I don't want to burden you. But since you posted again.. :)

As far as I can tell, it is created. But my knowledge in this stuff is quite limited. I actually started combing over the product to find where it instructs to create the index. I wasn't sure so I decided to lay off. In any case, before I try the commenting out.. Take a looksy at these screen shots and tell me if it appears that it is created and created successfully. Thanks again for taking the time to respond. I really don't want to be a pain.. Just check these out and tell me if you see any issue with the index... I think its ok.. But I would feel comfortable knowing someone who knows a lot more thinks its ok before I take a suggestion that starts with 'If you are absolutely sure the index has been created'.. lol Sorry that this is going out of the scope of what you would normally support. I understand if you decline to continue

Paul M 06-11-2008 05:57 PM

Neither of those screenshots shows the indexes, they are listed in phpmyadmin under the structure listing (see screenshot). You can also run the following command to list them ;

SHOW INDEX FROM post

MorrisMcD 06-11-2008 07:06 PM

Quote:

Originally Posted by Paul M (Post 1546877)
Neither of those screenshots shows the indexes, they are listed in phpmyadmin under the structure listing (see screenshot). You can also run the following command to list them ;

SHOW INDEX FROM post

Eeek... Problem found

My guess would be to start by deleting all the dateline indexes and then the dateline field? Then attempt reimporting again? Might end up with the same results

Hope I said that right...

I also noticed some tables named postindex_temp*****-*** that may or may not have been there before and may or may not have anything to do with this. I get by with people's help on here or other forums.. Sorry for my noobishness

Paul M 06-11-2008 07:54 PM

Quote:

Originally Posted by MorrisMcD (Post 1546927)
My guess would be to start by deleting all the dateline indexes and then the dateline field? Then attempt reimporting again? Might end up with the same results

You can delete all the indexes listed except these four : PRIMARY, userid, threadid, dateline.


Do not delete the dateline field in your database, you will break your forum, bigtime.

Guest210212002 06-15-2008 12:05 AM

This kills my DB as well, btw. Just tried installing it on a fresh DB, it creates the index then corrupts my post table.

The hack should have some kind of note/warning for users with big forums, as it creates an index on one of the biggest tables in the DB (post).

Edited for clarity: Folks may need to set their mysql timeouts higher for this to run on big tables.


All times are GMT. The time now is 01:05 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.01492 seconds
  • Memory Usage 1,834KB
  • 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
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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