1
maxima
Can content be extracted from one page to another?
  • 2007/1/10 18:47

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


I created 3 basic modules using the simple:
include("../../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>include(XOOPS_ROOT_PATH."/footer.php");

?>


I am trying to use a javascript tabbed section on a page which has 3 tabs and each will expand a hidden layer which should contain the information extracted from the basic modules.

I want to be able to add content to the basic modules using the add block tool in admin but not show the modules as links. The modules will just serve as the content holder.

Is there a smarty method to locate and display content from other modules or does it have to be an SQL query wrapped in PHP to format?

2
coopersita
Re: Can content be extracted from one page to another?

Maybe I misunderstood your questions, but what you want is for your modules not to show up in the menu?

If that's right, just go to Sys Admin > Modules, and se the order number to 0.

3
maxima
Re: Can content be extracted from one page to another?
  • 2007/1/11 1:24

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


Yes you certainly mis-understood. I want to extract content from one page to another.

I am thinking a smarty like this. This doesn't work. It is just a concept:
<div>
<{
show $block.content from=$xoops_dirname == "basic"}>
div>


I don't know the smarty tags but if there is one that locates the content of a directory in the database I think I can get it to work.

Or more likely an SQL query. This didn't work either but it's because I don't have a clue about DB query strings so someone with knowledge please help me correct this query.

It is to extract from the content column of the xoops_newblocks table and identify it by the title column 'Test'
<{php}>

$username='root';
$password='password';
$hostname='localhost';
$databasename='xoops';
$conection = @mysql_connect($hostname$username$password);
mysql_select_db($databasename);

$results mysql_query("SELECT content FROM xoops_newblocks WHERE title=('Test') ");

while ( 
$row mysql_fetch_array$results ) ) {

echo 
mysql_result($result);


}

<{/
php}>

4
maxima
Re: Can content be extracted from one page to another?
  • 2007/1/11 21:40

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


I have tried to alter the query in many ways but it just won't return the info.

5
wizanda
Re: Can content be extracted from one page to another?
  • 2007/1/11 22:36

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Sort of get what you are asking, the pages showing or not can be done in the XOOPS version file...by not adding sub pages...

you could also include each Smarty template needed....
$modversion['templates'][1]['file'] = 'painter.html';
$modversion['templates'][1]['description'] = 'Painter';

Then call these from the index.php of the module...
$xoopsOption['template_main'] = 'painter.html';

As for the Java script, if it is a function that can either be with the module or added into Xoops.js, as I have for quite a few extra functions

May not be what you are meaning; yet a step in the direction of XOOPS and smarty calls

6
script_fu
Re: Can content be extracted from one page to another?

I never could wrap my head around how to do this. I would love to figure it out so give this a go and let us know!

http://www.streetfighter.ca/demo/
http://dev.xoops.org/modules/xfmod/project/?xdb


I think this is XOOPS on steriods built with "Noah aka phparch"

http://www.leadpenguin.com/EN/index.html

7
maxima
Re: Can content be extracted from one page to another?
  • 2007/1/12 0:17

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


Thanks for the suggestion but this is being totally misunderstood. The following link shows what the final result will be.
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

Each tab when clicked should call the content using whichever method I can figure out. I think the DB query will eventually be ideal.

I want to be able to dynamically add content to these tabbed pages using the add block tool in the admin area. Since the content created will be stored in the DB at table xoops_newblocks then I want the related tabbed page to call the content from that table column 'content' and display it.

Now because the add block tool need to assign the block to a page/module, I am using the 'basic' module as a content collector but disabling its access.

I hope this clarifies my intent.

8
maxima
Re: Can content be extracted from one page to another?
  • 2007/1/12 18:14

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


So can the MySQL gurus help me correct this database query?

9
preachur
Re: Can content be extracted from one page to another?
  • 2007/1/12 18:34

  • preachur

  • Just can't stay away

  • Posts: 525

  • Since: 2006/2/4 4


I need this as well. You can see how it was running on http://aggregateresearch.com

I am re-building this site with XOOPS on a new server. I need to have this feature, and load blocks into it, but I can't seem to get it to work.

I am also still trying to figure out how to modify the recent posts block to display full-text, and then I want to integrate it into this.
Magick can never be restrained, but when freely given is thrice regained!

10
preachur
Re: Can content be extracted from one page to another?
  • 2007/1/14 22:56

  • preachur

  • Just can't stay away

  • Posts: 525

  • Since: 2006/2/4 4


Any ideas anyone?
Magick can never be restrained, but when freely given is thrice regained!

Login

Who's Online

148 user(s) are online (96 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

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

Latest GitHub Commits