1
cardo
Re: Need Help With Random Quote Module
  • 2003/7/11 2:31

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


Hi eggmcmuffin,

Are you planning on making this module so you can place it in a location similar to where I want it on my own site? I basically want the quote to act as a slogan that is random. So instead of residing in a normal block I simply want to have it within a cell.

You can can see what I am looking for at here:

http://www.beavercheese.com/beaverproto

The text in quotes below the words Beaver Cheese is what I'm looking for. I can do this easily in PostNuke using Autotheme and the built in Quotes module but apparently I cannot do this in XOOPS. I know it sounds like a small thing, but it is something that I really want on my site and aside from that and some other template related concerns XOOPS is really what I would rather run.

Thanks,

Rich



2
cardo
Re: Need Help With Random Quote Module
  • 2003/7/10 0:01

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


No need to be sorry. I really appreciate you trying to help. I figured there would be a way to do this like you can in PostNuke. With PostNuke using either AutoTheme or nucleiblocks you can put a block pretty much anywhere on the screen and it would appear on every page if you configured it correctly. Oh Well...



3
cardo
Re: Need Help With Random Quote Module
  • 2003/7/9 22:34

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


After further testing the line that causes the blank page to be displayed is:

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

If I comment this line out it my page displays as normal, without the random quote of course. I have two quotes in my database and the quotes display fine in the left block if I use one of the other themes. I am at a loss as to what is causing this to fail.




4
cardo
Re: Need Help With Random Quote Module
  • 2003/7/9 20:18

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


I should have said it in my last message but I tried both $texto and $quote. I will enable Smarty Error in preferences to see what it comes back with. I will post the results shortly.

[UPDATE]

Turning on Smarty Debugging worked when I didn't have the modified random quotes template in place, but as soon as I made the change I get the blank page and no pop up with the smarty variables listed as before. :(


Thanks again,

Rich



5
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.



6
cardo
Re: Need Help With Random Quote Module
  • 2003/7/9 16:12

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


Thanks YourHelp. I have a lot more work to go before it is ready though. :)



7
cardo
Re: Need Help With Random Quote Module
  • 2003/7/9 16:10

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


Thanks Lykoszine,

I will take a look at editing the template. I have the module installed already. I guess the problem is getting it to display in that location because it isn't within any of the normal layout locations. I know that with PostNuke and Autotheme you can put modules/blocks in non-standard locations. I will see if I can do the same with XOOPS.



8
cardo
Need Help With Random Quote Module
  • 2003/7/9 5:46

  • cardo

  • Just popping in

  • Posts: 8

  • Since: 2003/5/22


Hi All,

I am in the process of getting my site ready to go live and am trying to get the basic layout complete before getting all of the content done.

Please take a look athttp://www.beavercheese.com/bc for how it looks so far.

What I would like is to be able to print a random quote in the spot where you see the text, "Random Quote Module Text Here" on my site. When I was looking at PostNuke it was easy to do this, but I am still in my infancy when it comes to learning XOOPS.

In essence I want only text in quotes with no author. Essentially this is just going to be a random tagline for the site. Any help would be greatly appreciated.

Thanks,

Rich




TopTop



Login

Who's Online

216 user(s) are online (136 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

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

Latest GitHub Commits