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"}>
 
<{foreach 
item=block from=$xoBlocks.page_topcenter}> 
<
div class="blockTitle"><{$block.title}>div
<
div class="blockContent"><{$block.content}>div
<{/foreach}> 

<{else}>
The rest of your theme code goes here
<{/if}>


Hope this helps!
whttp://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 
""</span><span style="color: #007700">. </span><span style="color: #0000BB">htmlspecialchars</span><span style="color: #007700">(</span><span style="color: #0000BB">$xoopsConfig</span><span style="color: #007700">[</span><span style="color: #DD0000">'sitename'</span><span style="color: #007700">]).</span><span style="color: #DD0000">"

      

      

      

      "
;



$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 
"], ENT_QUOTES)."' border='0' />";

    echo 
"

".htmlspecialchars($xoopsConfig['slogan'])."

"
;

    echo 
"
";

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

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



    }

    echo 
"
"
;

}



echo 
"";



?>



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 http://www.metatrox.net if this help you guys out any.

Login

Who's Online

163 user(s) are online (73 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

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

Latest GitHub Commits