spamyboy wrote: I'm getting same error
Code: Select all
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE `phpbb_quotes` (
`quotes_name` VARCHAR( 255 ) NOT NULL ,
`quotes_value` LONGTEXT NOT NULL
) TYPE = MYISAM ;
INSERT INTO `phpbb_quotes` ( `quotes_name` , `quotes_value` )
VALUES (
'rndm_quotes', 'Enter your quotes here!'
);
INSERT INTO `phpbb_quotes` ( `quotes_name` , `quotes_value` )
VALUES (
'quotes_color', 'black'
);
INSERT INTO `phpbb_quotes` ( `quotes_name` , `quotes_value` )
VALUES (
'quotes_italic', '0'
);
INSERT INTO `phpbb_quotes` ( `quotes_name` , `quotes_value` )
VALUES (
'quotes_bold', '0'
);
INSERT INTO `phpbb_quotes` ( `quotes_name` , `quotes_value` )
VALUES (
'quotes_underline', '0'
);
INSERT INTO `phpbb_quotes` ( `quotes_value` , `quotes_name` )
VALUES (
'0', 'quotes_onoff'
);
INSERT INTO `phpbb_quotes` ( `quotes_name` , `quotes_value` )
VALUES (
'quotes_font', 'monospace'
);
INSERT INTO `phpbb_quotes` ( `quotes_name` , `quotes_value` )
VALUES (
'quotes_font_size', '12'
);
Code: Select all
Warning: explode(): Empty delimiter. in /home/content/a/g/n/agnadmin/html/site/includes/functions_quotes.php on line 31
Warning: shuffle() expects parameter 1 to be array, boolean given in /home/content/a/g/n/agnadmin/html/site/includes/functions_quotes.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/g/n/agnadmin/html/site/includes/functions_quotes.php:31) in /home/content/a/g/n/agnadmin/html/site/includes/page_header.php on line 501
Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/g/n/agnadmin/html/site/includes/functions_quotes.php:31) in /home/content/a/g/n/agnadmin/html/site/includes/page_header.php on line 503
Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/g/n/agnadmin/html/site/includes/functions_quotes.php:31) in /home/content/a/g/n/agnadmin/html/site/includes/page_header.php on line 504
Code: Select all
explode($board_quotes;'separator'] , $board_quotes['something'])
Code: Select all
explode(" | ", $board_quotes['quotes'] )
Code: Select all
//take the long original string and split it into individual quotes in the $rndm_quotes_array
$rndm_quotes_array = explode("|", $board_quotes['quotes']);
echo $rndm_quotes_array[rand(0,99)];
//shuffle the values of the rndm_quotes_array to get a randomly generated effect
// shuffle($thequotes);
//pick a random quote with the a default index array search since the indexes
// of rndm_quote_array will be different every time
$rndm_quotes = $rndm_quotes_array;
Code: Select all
<?php
/***************************************************************************
* functions_quotes.php
* -------------------
* begin : Thursday July 12 2006
* copyright : (C) 2006 dfritter4
* email : dfritter4@yahoo.com
* website : http://www.motrclan.com
*
* $Id: quotes.php,v 0.0.1 2006/07/12 12:32:09 dfritter4 Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
//just going to define one little function so that we dont have to write all the code out in the page_header.php
function exec_rndm_quotes() {
global $rndm_quotes, $quotes_bold, $quotes_italic, $quotes_underline, $rndm_quotes_array, $board_quotes;
//take the long original string and split it into individual quotes in the $rndm_quotes_array
$rndm_quotes_array = explode(" | ", $board_quotes['rndm_quotes']);
//shuffle the values of the rndm_quotes_array to get a randomly generated effect
shuffle($rndm_quotes_array);
//pick a random quote with the a default index array search since the indexes
// of rndm_quote_array will be different every time
$rndm_quotes = $rndm_quotes_array[0];
//get the different formatts and tell each one what theyre supposed to do
// like bold, italic, and underline
// BTW MOD TEAM THAT WILL BE READING THIS: if there's an easier way, feel free
// to let me know
if( $board_quotes['quotes_bold'] == TRUE )
{
$quotes_bold = 'b';
}
else
{
$quotes_bold = 'nothing';
}
if( $board_quotes['quotes_italic'] == TRUE)
{
$quotes_italic = 'i';
}
else
{
$quotes_italic = 'nothing';
}
if( $board_quotes['quotes_underline'] == TRUE)
{
$quotes_underline = 'u';
}
else
{
$quotes_underline = 'nothing';
}
if( $board_quotes['quotes_onoff'] == FALSE)
{
$rndm_quotes = "";
}
else
{
//do nothing because we want the quotes turned on
}
}
//this is a function for selecting the font. it took me forever to figure out how to do this perfectly btw ;)
function quotes_font_select($default, $select_name = 'quotes_font')
{
global $quotes_font, $lang;
if ( !isset($default) )
{
$default == $font_name;
}
$quotes_font = '<select name="' . $select_name . '">';
while( list($font_name, $font_name_appearance) = @each($lang['quotes_font']) )
{
$selected = ( $font_name == $default ) ? ' selected="selected"' : '';
$quotes_font .= '<option value="' . $font_name . '"' . $selected . '>' . $font_name_appearance . '</option>';
}
$quotes_font .= '</select>';
return $quotes_font;
}
//this is a function for selecting the font size. same as font style function
function quotes_font_size_select($default, $select_size = 'quotes_font_size')
{
global $quotes_font_size, $lang;
if (!isset($default) )
{
$default == $font_size;
}
$quotes_font_size = '<select name="' . $select_size . '">';
while( list($font_size, $font_size_appearance) = @each($lang['quotes_font_size']) )
{
$selected = ( $font_size == $default ) ? ' selected="selected"' : '';
$quotes_font_size .= '<option value="' . $font_size . '"' . $selected . '>' . $font_size_appearance . '</option>';
}
$quotes_font_size .= '</select>';
return $quotes_font_size;
}
?>