1
metatrox
Create a separate block without theme
  • 2007/9/17 18:18

  • metatrox

  • Just popping in

  • Posts: 11

  • Since: 2006/12/18


Here is what I would like to do. I want to create a page that ONLY displays a custom block of mine. Thats it! None of my menu stuff or other page contents. Kinda like an rss feed but not.

I want to create a page for my iPhone to access the most recent forum topics. But I don't want all the other site stuff loaded. Just the actual block itself. Any ideas how I go about doing something like this?

i know a bit of coding but not a whole lot so if you can put it into easy terms it would be appreciated.

2
Will_H
Re: Create a separate block without theme
  • 2007/9/17 20:53

  • Will_H

  • Friend of XOOPS

  • Posts: 1786

  • Since: 2004/10/10


content module.

3
metatrox
Re: Create a separate block without theme
  • 2007/9/18 5:08

  • metatrox

  • Just popping in

  • Posts: 11

  • Since: 2006/12/18


Hmm... how do I go about using this?


I want to create a page all by itself that just displays a block. nothing else. no header / footer stuff. Just a block of my choice

4
tcnet
Re: Create a separate block without theme
  • 2007/9/18 9:25

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


You could modify root/pda.php to show latest forum instead of latest news.

5
pod
Re: Create a separate block without theme
  • 2007/9/18 9:36

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


You could try this...

Copy your index.php page - name it iphone.php.

Then in your theme, do something like this:
<{if $xoops_requesturi == "/your_xoops_root/iphone.php"}>
<!-- 
Start center-top blocks loop --> 
<{foreach 
item=block from=$xoBlocks.page_topcenter}> 
<
div class="blockTitle"><{$block.title}></div
<
div class="blockContent"><{$block.content}></div
<{/foreach}> 
<!-- 
End center-top blocks loop -->
<{else}>
The rest of your theme code goes here
<{/if}>


Hope this helps!
www.myxoops.com - MyXoops Is Your XOOPS!

6
metatrox
Re: Create a separate block without theme
  • 2007/9/18 15:23

  • metatrox

  • Just popping in

  • Posts: 11

  • Since: 2006/12/18


Im not exactly sure how to attempt either of those so perhaps i could get you to explain what i need to change in the PDA page for the iPhone page.

What do i need to change below so it will display the latest 20 forum posts?

include "mainfile.php";

header("Content-Type: text/html");



echo 
"<html><head><title>"htmlspecialchars($xoopsConfig['sitename'])."</title>

      <meta name='HandheldFriendly' content='True' />

      <meta name='PalmComputingPlatform' content='True' />

      </head>

      <body>"
;



$sql "SELECT storyid, title FROM ".$xoopsDB->prefix("stories")." WHERE published>0 AND published<".time()." ORDER BY published DESC";



$result $xoopsDB->query($sql,10,0);



if (!
$result) {

    echo 
"An error occured";

} else {

    echo 
"<img src='images/logo.gif' alt='".htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)."' border='0' /><br />";

    echo 
"<h2>".htmlspecialchars($xoopsConfig['slogan'])."</h2>";

    echo 
"<div>";

    while (list(
$storyid$title) = $xoopsDB->fetchRow($result)) {

        echo 
"<a href='".XOOPS_URL."/modules/news/print.php?storyid=$storyid'>".htmlspecialchars($title)."</a><br />";



    }

    echo 
"</div>";

}



echo 
"</body></html>";



?>



I ALSO tried to copy index.php and added the code sugested to my theme but it just loads like a normal front page. Not sure what i'm doing wrong with that one either.

My page is www.metatrox.net if this help you guys out any.

Login

Who's Online

230 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 230


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