vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - QuoteIt! - Quote Database (https://vborg.vbsupport.ru/showthread.php?t=135297)

Dr. Bantham 02-08-2008 09:10 PM

Quote:

Originally Posted by Cap'n Steve (Post 1438735)
Try reuploading the latest files and reinstalling (without uninstalling) the product. If that doesn't work, edit the "Finalize BBCode" plugin that uses the "newpost_preview" hook and replace this:

PHP Code:



with this:

PHP Code:

header('Content-type: text/plain');
die(
'quotes = ' print_r($quotebbcodeidstrue) . "\n random = " print_r($randomquotestrue));


Then try previewing a post with a few [quotes] and [randomquote] bbcodes in it and tell me what the output is. This will break the post preview, so undo the edit after you're done.

I have tried the full reinstall several times previously. As for the output test, it results in the following:
Code:

quotes =
 random =

I do have one issue which I should point out. After importing quotes on multiple occasions, the reference numbers where out of sync. At one time, Quote #1 was actually had a reference number of 400+. I "fixed" this by manually changing all of the reference numbers with phpMyAdmin, starting from 1 on. However, I noticed that any new quotes would be given a much higher number than simply the last quote number + 1. Apparently there must be a counter setting which needs to be reset. Could this be the problem? If not, I would still like to know where this number is stored and how I can change it.

Cap'n Steve 02-09-2008 07:22 AM

That is very strange. The ids are managed by MySQL, so it doesn't really matter what they are, but you should be able to reset them with this query (replacing $TP with your table prefix), although I wouldn't mess with that unless it really bothers you (that's what the "Show Continuous Quote IDs" option is for):

[sql]ALTER TABLE $TPquotes AUTO_INCREMENT = 1[/sql]

The only thing I can suggest to try is finding this in includes/functions_quoteit.php:
PHP Code:

        $quotebbcodeclasses[$quoteid] = $bgclass

and after that, adding this:

PHP Code:

    if ($vbulletin->userinfo['userid'] == 859) {
        
header('Content-type: text/plain'true);
        echo 
"DEBUG: Found quote $quoteid, returning {Q" QUOTE_BBCODE_ID ":$quoteid}.\n";
    } 

Then I'll try to gather some more information tomorrow.

Dr. Bantham 02-09-2008 10:25 AM

Quote:

Originally Posted by Cap'n Steve (Post 1439296)
That is very strange. The ids are managed by MySQL, so it doesn't really matter what they are, but you should be able to reset them with this query (replacing $TP with your table prefix), although I wouldn't mess with that unless it really bothers you (that's what the "Show Continuous Quote IDs" option is for):

[sql]ALTER TABLE $TPlinks AUTO_INCREMENT = 1[/sql]

I am not clear on this and thus reluctant to run the query. Is the table prefix "quotes"? My database name? Will this renumber the entries sequentially, but not impact quotes added thereafter? I really do want to get the numbering straight, as it does bug me considerably to have 500+ integers separating quote runs.
Quote:

Originally Posted by Cap'n Steve (Post 1439296)
The only thing I can suggest to try is finding this in includes/functions_quoteit.php:
PHP Code:

        $quotebbcodeclasses[$quoteid] = $bgclass

and after that, adding this:

PHP Code:

    if ($vbulletin->userinfo['userid'] == 859) {
        
header('Content-type: text/plain'true);
        echo 
"DEBUG: Found quote $quoteid, returning {Q" QUOTE_BBCODE_ID ":$quoteid}.\n";
    } 

Then I'll try to gather some more information tomorrow.

This had no impact that I could discern. HOWEVER, while repeatedly working with this, I re-imported the product again (as I had done several times before). Voila! Both BBCodes now work consistently. I swear I had done this several times. As with a previous problem, importing and saving settings seem to be subject to whimsy, as there is often a variable impact. Saving settings with no change or re-importing repeatedly can sometimes fix problems - eventually - maybe - curious. Anyway, this procedure deleted the two additional fields and related data which I had created, but a quick query using a table backup fixed this. And yes, the problem was evident before I started creating new fields. At least that is the way I remember it! I am beginning to wonder, at this point. Anywho, many thanks for the persistent assistance!

Cap'n Steve 02-10-2008 12:07 AM

About the alter query, that was a typo and it should actually be run on the quotes table. :o The table prefix is whatever you chose in your config.php. I have no experience altering the auto_increment value, but it should only affect new quotes. I'm not sure how the gaps would get there in the first place; have you restored backups of the quotes table before? That's the only thing I can think of that might mess with the auto_increment value.

The edits I had you do would only show up for me (859 is my userid on your site), but if it fixed itself you can go ahead and remove them. I swear the bbcode parser has a mind of its own sometimes.

cookiepants 02-10-2008 06:50 AM

What a great mod! I have installed it and so far everything was great until I turned it on. My forumhome page was totally white. No error message. When I turned it off then it came back. I deleted the forumhome Quotes coding, and still the same problem until I turned off Quotes.

Any ideas? I'd love to use this but I'm not sure how I can turn it on and have my forum home available.

Thanks so much!

Dr. Bantham 02-11-2008 01:15 AM

Quote:

Originally Posted by Cap'n Steve (Post 1439700)
About the alter query, that was a typo and it should actually be run on the quotes table. :o The table prefix is whatever you chose in your config.php. I have no experience altering the auto_increment value, but it should only affect new quotes. I'm not sure how the gaps would get there in the first place; have you restored backups of the quotes table before? That's the only thing I can think of that might mess with the auto_increment value.

I fixed this with:
[sql]ALTER TABLE quotes AUTO_INCREMENT=252[/SQL]Instead of using 1 as the variable, I used the next desired quote number. This set the Next Autoindex to the desired value. The huge gaps occurred when I had repeatedly deleted and imported quotes from a text file. Thanks for the lead!

Boofo 02-11-2008 01:43 AM

The gaps are from quotes that have been deleted. That is normal procedure in the increment world. My home-grown quotes hack does the same thing. Be careful messing with the auto-increment too much as it can cause more headaches than it's worth sometimes. I am proof of that. ;)

Cap'n Steve 02-12-2008 04:30 AM

Thanks for posting information about the auto incrementing. I would have expected it to reuse the ids of deleted quotes, but I guess not.

cookiepants - Can you check your server's error log? Something might have shown up there. If not, try adding a quote before turning on the random quote by going to quotes.php?do=addquote on your site. You can also try reuploading the files and reimporting the product.

cookiepants 02-12-2008 05:34 AM

It worked out great, thanks! My members LOVE this feature.

Is there a way to make the font and or the quote box a bit smaller? Thanks!

Boofo 02-12-2008 08:05 AM

Quote:

Originally Posted by Cap'n Steve (Post 1441217)
Thanks for posting information about the auto incrementing. I would have expected it to reuse the ids of deleted quotes, but I guess not.

No way it can, that is why it is called "auto-increment". It only increments. It doesn't care if you mess with what it did before. And those missing rows don't do anything harmful at all. It's as if they never existed except for the numbering.


All times are GMT. The time now is 05:24 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.01942 seconds
  • Memory Usage 1,766KB
  • 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
  • (6)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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