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)

thepub 04-09-2007 03:20 AM

thanks so far so good!

rburns 04-10-2007 05:13 AM

Quote:

Originally Posted by Cap'n Steve (Post 1220087)
ZippySLC - It looks like that's an error with some Joomla plugin. You'll have to ask wherever you got that addon.

rburns - So what do want to happen when they post? Do you want the quote from that category added to the post?

Yes, that's exactly what I would like.

I also still have the funny {Q5263537:4} answer to my BBcode? I rechecked all the file changes you gave me all are correct.

Thanks

Cap'n Steve 04-11-2007 01:51 AM

Try adding this in a plugin at the quoteit_bbcode_begin hook and tell me what it prints when viewing a thread with the bbcode in it. You can disable the plugin afterward.
PHP Code:

header('Content-type: text/plain');
die(
print_r($quotebbcodeidstrue)); 

I'm not sure how to handle the request to automatically add quotes when posting. The best way would probably be to add a the bbcode to the post before it gets processed, but you'll have to find the right hook. You can use this code to get a listbox with the categories:
PHP Code:

require_once(DIR '/includes/functions_quoteit.php');
$listbox fetch_quote_categories(false$the_id_of_the_default_category); 

You'll need to put that in another hook and then use $listbox where you want it to appear. Then when they submit the post, $_REQUEST['category'] will be an array containing the selected category id.

rburns 04-11-2007 05:56 PM

Quote:

Originally Posted by Cap'n Steve (Post 1224628)
Try adding this in a plugin at the quoteit_bbcode_begin hook and tell me what it prints when viewing a thread with the bbcode in it. You can disable the plugin afterward.
PHP Code:

header('Content-type: text/plain');
die(
print_r($quotebbcodeidstrue)); 

I'm not sure how to handle the request to automatically add quotes when posting. The best way would probably be to add a the bbcode to the post before it gets processed, but you'll have to find the right hook. You can use this code to get a listbox with the categories:
PHP Code:

require_once(DIR '/includes/functions_quoteit.php');
$listbox fetch_quote_categories(false$the_id_of_the_default_category); 

You'll need to put that in another hook and then use $listbox where you want it to appear. Then when they submit the post, $_REQUEST['category'] will be an array containing the selected category id.

Did that and when the plugin is active it just gives me a white page, source is blank too.

Just to make sure I did the right thing:

1, add new plugin
2, product: quoteit!
3, choose quoteit_bbcode_begin as the hook location
4, title called it quoteithelp
5, execution order is 5 (was there so left it)
6, pasted in the PHP
7, active: yes

went to page to put in bbcode but when I selcted the thread it went to the blank page. have I done something wrong?


list box is exactly what I'd like, what hook do I put it in?

thepub 04-12-2007 01:38 AM

whenever I try to rate a quote I get this message
Quote:

The requested URL /http://www.theneighborhoodpub.com/forums.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Cap'n Steve 04-12-2007 04:00 AM

I've uploaded a new version that fixes a few small things.

thepub - Try the new files, or enable Javascript to use the AJAX voting.

rburns - Something's definitely wrong then, try redoing the edits and testing it in several places, like the post preview, the actual post, and a private message. I'm not exactly sure what hook to use for your listbox idea, the listbox just has to be generated before the new post template is shown. The one to insert bbcode needs to run before bbcode is parsed. Other than that, I'm not sure.

skorzguy 04-12-2007 05:50 AM

I love the idea and concept of the quotes sytem but I can't get it to work with the Zoints profile system without causing errors. I get the errors and problems after installing the plugin-globalquote.xml file to allow quotes to be on all pages (PhotoPost Products using VB3 Enhanced feature). I am sure it's a somewhat easy fix, I played with it for a while and could not get it to work. I would say forget Zoints but it is a nice profile system.

Better Idea:
---------------
I managed to get the quotes showing globably by placing your code in the navbar instead of the forumhome template since I am using vb3enhanced feature with PhotoPost:

<!-- BEGIN QuoteIt! -->
$showrandomquote
<!-- END QuoteIt! -->

** I still get the same error regardless of where I put the code

Error shown in Zoints after adding the global plugin
---------------------------------------------------------------------
Parse error: syntax error, unexpected T_STRING in /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code on line 3

Warning: Cannot modify header information - headers already sent by (output started at /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code:3) in /z/includes/zoints.php on line 341

Warning: Cannot modify header information - headers already sent by (output started at /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code:3) in /z/includes/zoints.php on line 342

Warning: Cannot modify header information - headers already sent by (output started at /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code:3) in /z/includes/zoints.php on line 343

Warning: Cannot modify header information - headers already sent by (output started at /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code:3) in /z/includes/functions.php on line 100

Warning: Cannot modify header information - headers already sent by (output started at /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code:3) in /z/includes/functions.php on line 103

------------------------------------------------------------------------

Here is the plugin-globalquote.xml code:

<plugins>
<plugin active="1" executionorder="7" product="quoteit">
<title>Global Random Quote</title>
<hookname>global_start</hookname>
<phpcode><![CDATA[if ($quoteitoptions['showrandomquote']) {
define('QUOTEIT_GLOBAL', true);
require_once(DIR . '/includes/functions_quoteit.php');
}]]></phpcode>
</plugin>
</plugins>

------------------------------------------------------------------------
I tried changing the executionorder number, true to false, and some oddball ideas which didn't work.

Can someone help because I don't want to just have this on the forum. Thanks for your time and consideration.

Cap'n Steve 04-12-2007 07:55 AM

Could you tell me what's on those lines mentioned in the Zoint's error messages?

skorzguy 04-12-2007 04:04 PM

Quote:

Originally Posted by Cap'n Steve (Post 1225731)
Could you tell me what's on those lines mentioned in the Zoint's error messages?

Parse error: syntax error, unexpected T_STRING in /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code on line 3

vbulletin36.php
--------------------

Here is line 3 on vbulletin36.php:
define('THIS_SCRIPT', 'Zoints'); # fix for vbportal's lack of vbulletin compatibility

Here is line 116:
eval('$headinclude = "' . fetch_template('headinclude') . '";');

** Should line 116 have this? '";'); I am not a programmer but looks weird


----------------------

Cannot modify header information - headers already sent by (output started at /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code:3) in /z/includes/zoints.php on lines (341 + 342 + 343)

zoints.php
--------------

Line 341 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
Line 342 header("Pragma: no-cache");
Line 343 header("Cache-Control: no-cache, must-revalidate");

Lines 335-350 if this helps:

if (is_a($this->_user, 'z_user') AND $this->_user->usergroup('zointsadmin') AND !$this->_config['userstyles'])
{
$this->_config['userstyles_off'] = 1;
$this->_config['userstyles'] = 1;
}

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header("Pragma: no-cache");
header("Cache-Control: no-cache, must-revalidate");


if (!defined('z_install'))
{
$this->_template->_navbar->init();
}


---------------

Warning: Cannot modify header information - headers already sent by (output started at /home/allswac1/public_html/forum/z/includes/external_auth/vbulletin36.php(116) : eval()'d code:3) in /z/includes/functions.php on lines (100+103)

function.php
---------------

Line 100 header("HTTP/1.1 301 Moved Permanently");
Line 103 header("Location: $url");

This is lines 82-105 if this helps:

// check if it's a full url, ie http://
if (!preg_match('#^[a-z]+://#i',$url))
{
$dir = dirname($_SERVER['PHP_SELF']);
if (substr($url,0,1) != '/' AND substr($dir,-1,1) != '/')
{
$dir .= '/';
}
$url = (($_SERVER["SERVER_PORT"] == 443)?'https://':'http://') . $_SERVER['HTTP_HOST'] . $dir . $url;
}

if (strpos($url, '&amp;'))
{
$url = str_replace('&amp;', '&', $url);
}

if ($threeohone)
{
header("HTTP/1.1 301 Moved Permanently");
}

header("Location: $url");
exit;
}

--------------------------------------------------------------

I hope this helps, like I said. The quotes works perfectly on the forums page but I would like it to be on other pages too like this. It does this after adding the global plugin but it doesn't allow the zoints profile's to work anymore.

Cap'n Steve 04-13-2007 03:04 AM

It looks like a problem with the headinclude template. Try editing and then saving it without changing anything. If it doesn't give you an error when saving, post the template here.


All times are GMT. The time now is 02:30 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.01388 seconds
  • Memory Usage 1,784KB
  • 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
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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