SOLVED - Php Error In Blocks_imp_random_quote.php »  Show posts from    to     

Icy Phoenix


Old Support Topics - SOLVED - Php Error In Blocks_imp_random_quote.php



gearhead [ Thu 06 Nov, 2008 02:14 ]
Post subject: SOLVED - Php Error In Blocks_imp_random_quote.php
Hi everyone. I'm running IP 1.2.0.27c .

I've had IP for a long time, and love it.

Right now, I'm having a php error. It happens when I try to use the random quote block on my home page.

Here's the error message:
Spoiler: [ Show ]


here's the blocks_imp_random_quote.php:

Spoiler: [ Show ]


There's an error in line 31?

I'm getting pretty good at mysql, but need to study php more in depth, so I can solve more issues myself. Maybe a simple php syntax error?

Thanks in advance.


Limun [ Thu 06 Nov, 2008 05:28 ]
Post subject: Re: Php Error In Blocks_imp_random_quote.php
i would check if u have in all your "lang_ " this file lang_randomquote.php


gearhead [ Thu 06 Nov, 2008 06:42 ]
Post subject: Re: Php Error In Blocks_imp_random_quote.php
So, I must have more than just English to make random quote php work?

Thanks Limun.



P.S. the default random quotes work perfect on forum.php

(forum view)


Limun [ Thu 06 Nov, 2008 11:03 ]
Post subject: Re: Php Error In Blocks_imp_random_quote.php
gearhead wrote: [View Post]
So, I must have more than just English to make random quote php work?

Thanks Limun.



P.S. the default random quotes work perfect on forum.php

(forum view)


you can do this

open your block_imp_random_quote.php

FIND
Code: [Hide] [Select]
global $lang, $template, $phpbb_root_path, $phpEx;


REPLACE WITH
Code: [Hide] [Select]
global $lang, $board_config, $template, $phpbb_root_path, $phpEx;


let us know if help


gearhead [ Fri 07 Nov, 2008 02:54 ]
Post subject: Re: Php Error In Blocks_imp_random_quote.php
Thanks. The error is gone, but there is no quote in the block.

any ideas?

Anyway, I'm using a javascript random quote on my home page now, and new quoted can be added, as many as you want.



fucile [ Fri 07 Nov, 2008 05:29 ]
Post subject: Re: Php Error In Blocks_imp_random_quote.php
Sorry for my bad english

The mod " Random Quote " needed the this line

Code: [Hide]
  1.  
  2. if(!function_exists(imp_random_quote_func))
  3. {
  4. function imp_random_quote_func()
  5. {
  6. global $lang, $template, $board_config, $portalconfig, $phpbb_root_path, $phpEx, $randomquote;
  7. include_once($phpbb_root_path . 'includes/page_header.' . $phpEx);
  8. include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_randomquote.' . $phpEx);
  9. $randomquote_phrase = $randomquote[rand(0, count($randomquote) - 1)];
  10. $template->assign_vars(array(
  11. 'RANDOM_QUOTE' => $randomquote_phrase,
  12.  
  13.  


Bye Fucile


gearhead [ Sat 08 Nov, 2008 17:09 ]
Post subject: Re: Php Error In Blocks_imp_random_quote.php
Thanks Fucile;

That totally fixed the problem!!!





Powered by Icy Phoenix