1
helphelprrr
Mytab ajax hacks
  • 2011/5/30 4:12

  • helphelprrr

  • Just popping in

  • Posts: 4

  • Since: 2011/4/21


In mytab 2.1 for xoops, I added the following code in a new file of mytabs_block_ajax.php which is called by original mytabs_block.php so that the block content can be loaded separately under each tab.

==================
include '../../../mainfile.php';
include_once XOOPS_ROOT_PATH."/class/template.php";
include_once XOOPS_ROOT_PATH.'/modules/mytabs/include/functions.php';

$GLOBALS['xoopsTpl'] =& new XoopsTpl();

$tab_blocks = mytabsblock_show($_GET['pageid'], $_GET['tabid'],'',$_GET['o']);
echo $tab_blocks[0]['content'];
==================

It works properly. However, by the original block, it generates caches start with modulename-default-deafult-xxxx. However, under the content generated by ajax tab, it becomes system-default-defult-xxxx. Is there any method to synchronize the cache name so that it won't duplicate loaded?



2
helphelprrr
cache name
  • 2011/5/28 2:31

  • helphelprrr

  • Just popping in

  • Posts: 4

  • Since: 2011/4/21


if i write the following content in block to return the block content by method "echo" instead of returning the content to template file, the cache name will become starting with system-default-default-xxxx. May I know if there is any way to control the cache name / cache prefix?

================
include '../../../mainfile.php';
include_once XOOPS_ROOT_PATH."/class/template.php";
include_once XOOPS_ROOT_PATH.'/modules/mytabs/include/functions.php';

$GLOBALS['xoopsTpl'] =& new XoopsTpl();

$tab_blocks = mytabsblock_show($_GET['pageid'], $_GET['tabid'],'',$_GET['o']);
echo $tab_blocks[0]['content'];
================



3
helphelprrr
return block theme after ajax
  • 2011/4/21 6:55

  • helphelprrr

  • Just popping in

  • Posts: 4

  • Since: 2011/4/21


i am using ajax to write the content for a block in xoops 2.3. However, I have no way to return back the content to the original block with its template file.

Is there any solution for returning the block content to the original template file instead of hard coding the html source in the ajax file? i.e. share the template file in ajax content for a block.

Structure:

blocks/test.php
blocks/test_ajax.php
template/test.html



4
helphelprrr
return block theme after ajax
  • 2011/4/21 5:55

  • helphelprrr

  • Just popping in

  • Posts: 4

  • Since: 2011/4/21


i am using ajax to write the content for a block in xoops 2.3. However, I have no way to return back the content to the original block with its template file.

Is there any solution for returning the block content to the original template file instead of hard coding the html source in the ajax file? i.e. share the template file in ajax content for a block.

Structure:

blocks/test.php
blocks/test_ajax.php
template/test.html




TopTop



Login

Who's Online

259 user(s) are online (152 user(s) are browsing Support Forums)


Members: 0


Guests: 259


more...

Donat-O-Meter

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

Latest GitHub Commits