292521
cardo
Re: Need Help With Random Quote Module
  • 2003/7/9 19:34

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


Thanks lykoszine,

I tried that and when I make the change I only get a blank page in the browser. The code looks like this.

Quote:

<?php
// ------------------------------------------------------------------------ //
// Random Quotes Module for //
// XOOPS - PHP Content Management System 2.0 //
// Versión 1.0.0 //
// Copyright (c) 2002 Mario Figge //
//http://www.zona84.com //
// ------------------------------------------------------------------------- //

/******************************************************************************
* Function: random_quote_show
* Input : void
* Output : $texto: Text of the quote
$autor: Autor of the quote
******************************************************************************/
function random_quote_show() {
global $xoopsDB;
$block = array();
$result = $xoopsDB->query("SELECT count(*) FROM ".$xoopsDB->prefix("citas"));
list($total_rows) = $xoopsDB->fetchRow($result);
$x = rand(1,$total_rows);
$result = $xoopsDB->query("SELECT texto, autor FROM ".$xoopsDB->prefix("citas")." WHERE id=".$x);
list($texto, $autor)= $xoopsDB->fetchRow($result);
$block['texto']=$texto;
$block['autor']=$autor;
return $block;
}

?>


What I did was replaced "return $block;" with $tpl->assign("quote", $texto);

I confirmed it was activated and then put <{$texto}> in the cell where I wanted it and now I get a blank page. If I switch back to the original Random Quote template it works ok but displays in the left block. Am I doing something wrong? :)

Thanks again for your help.



292522
mvandam
Re: Blank page after instalation
  • 2003/7/9 19:18

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


OK, glad you got it working. I'll update the wiki page with this information. Thanks!



292523
Pete
Re: Blank page after instalation
  • 2003/7/9 19:08

  • Pete

  • Just popping in

  • Posts: 10

  • Since: 2002/7/5 0


I just realized that I have the options set as "force lower case on transfer" on my ftp prog... this may have been the problem..

Re-uploading the /class folder...

That seemed to have done it.

Problem solved!

Solution: ftp program settings. (read above)



292524
mvandam
Re: Blank page after instalation
  • 2003/7/9 19:03

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Quote:

Finally! an error message with that one! (I think this whole topic may solve lots of people's problems.)
Now what?


Hmmm, strange, it can't find one of your files. Does the indicated file exist on your server? Is it in the correct place? Looks like maybe the unzipping/uploading (however you get your files onto your server) didn't work properly... maybe try installing the files again and see if that fixes it.



292525
Pete
Re: Blank page after instalation
  • 2003/7/9 17:53

  • Pete

  • Just popping in

  • Posts: 10

  • Since: 2002/7/5 0


Quote:
If you're having trouble getting to admin page, you can edit include/common.php... around line 83, instead of 'error_reporting(0)', put 'error_reporting(E_ALL)'.




Finally! an error message with that one! (I think this whole topic may solve lots of people's problems.)
Now what?

Fatal errorFailed opening required '/var/www/html/jer/class/smarty/Smarty.class.php' (include_path='.:/php/includes:/usr/share/php'in /var/www/html/jer/class/template.php on line 38





292526
lykoszine
Re: Need Help With Random Quote Module
  • 2003/7/9 17:49

  • lykoszine

  • Module Developer

  • Posts: 244

  • Since: 2002/1/2 2


Sorry mate, completely ignored your main problem.

Here is a suggestion:

1 - open the blocks file in /modules/randomquotes/blocks (not sure about the dir name)

2 - At the end of the block, instead of the
return $block;
use

$tpl->assign("quote", $thevariablewhere_the_quote_is_stored);

Then in your theme.html, just use <{$quote}> where you want it
(you will need to activate the block as a left block visible to all, but hopefully nothing will display cos it will be empty. Ah, better return an empty '';)



292527
mvandam
Re: Blank page after instalation
  • 2003/7/9 17:40

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Do you have debugging turned on from XOOPS Administration preferences? (General Preferences | PHP Debugging)

If you're having trouble getting to admin page, you can edit include/common.php... around line 83, instead of 'error_reporting(0)', put 'error_reporting(E_ALL)'.



292528
Pete
Re: Blank page after instalation
  • 2003/7/9 17:25

  • Pete

  • Just popping in

  • Posts: 10

  • Since: 2002/7/5 0


; Print out errors (as a part of the output).  For production web sites,
you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On

; Even when display_errors is on, errors that occur during PHP'
s startup
sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = On


Maybe it's me.. Does this seem right?
same prob..

Xoops Test spot

Let me just add that the 1.3.1 stable version works fine on the same server.



292529
gservo
Re: Banner click go's back to strange login screen
  • 2003/7/9 17:06

  • gservo

  • Just popping in

  • Posts: 6

  • Since: 2003/6/16


I figured out my problem, I was talking to a php programer type person thingie, he suggested that i turn on custom sessions, Doing this fixed my banners...



292530
mvandam
Re: Blank page after instalation
  • 2003/7/9 16:53

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Keep digging ... there is *always* an error message behind the blank page problem... There is really nothing we can do until you are able to produce an error message. *Many* different types of problems can result in an error, and all *fatal errors* lead to a blank page.

In particular, if you are running your own host, check php.ini and make sure "display_errors" is "on". If you are with a host provider, you can override this setting in a .htaccess file, if they run apache.







Login

Who's Online

184 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 184


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits