Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 + 9 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
prefix('content')." WHERE storyid=$thisid"); while($myrow1 = $xoopsDB->fetchArray($query1) ) { $thisid_parent = $myrow1['parent_id']; } // create a new array $tabs=array(); // create a counter $q=1; // Query the DB and put story data into the array. $query = $xoopsDB->query("SELECT storyid, parent_id, blockid, submenu, title, visible FROM ".$xoopsDB->prefix('content')." WHERE storyid=$thisid OR parent_id=$thisid OR storyid=$thisid_parent OR parent_id= CASE WHEN $thisid_parent >0 THEN $thisid_parent ELSE $thisid END AND visible=1"); while($myrow = $xoopsDB->fetchArray($query) ) { $tabs[$q]['storyid'] = $myrow['storyid']; $tabs[$q]['parent_id'] = $myrow['parent_id']; $tabs[$q]['blockid'] = $myrow['blockid']; $tabs[$q]['submenu'] = $myrow['submenu']; $tabs[$q]['title'] = $myrow['title']; $tabs[$q]['visible'] = $myrow['visible']; $q++; } return $tabs; } // ------------------------------------------------------------------------- // // END of Peekays Tab Hack // // ------------------------------------------------------------------------- // $id = isset($HTTP_GET_VARS['id']) ? intval($HTTP_GET_VARS['id']) : 0; if ($id != 0) { $result = $xoopsDB->queryF("SELECT storyid, title, text, visible, nohtml, nosmiley, nobreaks, nocomments, link, address FROM ".$xoopsDB->prefix(_MIC_CONTENT_PREFIX)." WHERE storyid=$id"); } else { $result = $xoopsDB->queryF("SELECT storyid FROM ".$xoopsDB->prefix(_MIC_CONTENT_PREFIX)." WHERE homepage=1"); list($storyid) = $xoopsDB->fetchRow($result); header("Location: $PHP_SELF?id=$storyid"); } include_once XOOPS_ROOT_PATH.'/header.php'; list($storyid,$title,$text,$visible,$nohtml,$nosmiley,$nobreaks,$nocomments,$link,$address) = $xoopsDB->fetchRow($result); if ($link == 1) { // include external content $includeContent = XOOPS_ROOT_PATH."/modules/"._MIC_DIR_NAME."/content/".$address; if (file_exists($includeContent)){ $xoopsOption['template_main'] = 'ct_index.html'; ob_start(); include($includeContent); $content = ob_get_contents(); ob_end_clean(); //$content = include($includeContent); $xoopsTpl->assign('title', $title); $xoopsTpl->assign('content', $content); $xoopsTpl->assign('nocomments', $nocomments); $xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_C_INTARTIGO,$xoopsConfig['sitename']).'&body='.sprintf(_C_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/content/index.php?id='.$id); $xoopsTpl->assign('lang_printerpage', _C_PRINTERFRIENDLY); $xoopsTpl->assign('lang_sendstory', _C_SENDSTORY); $xoopsTpl->assign('id', $id); } else{ redirect_header("index.php",1,_C_FILENOTFOUND); } } else { // tiny content $xoopsOption['template_main'] = 'ct_index.html'; if ($nohtml == 1) { $html = 0; } else { $html = 1; } if ($nosmiley == 1) { $smiley = 0; } else { $smiley = 1; } if ($nobreaks == 1) { $breaks = 0; } else { $breaks = 1; } $myts =& MyTextSanitizer::getInstance(); $text=$myts->displayTarea($text, $html, $smiley, 1, 1, $breaks); $xoopsTpl->assign('title', $title); $xoopsTpl->assign('content', $text); $xoopsTpl->assign('nocomments', $nocomments); $xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_C_INTARTIGO,$xoopsConfig['sitename']).'&body='.sprintf(_C_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/content/index.php?id='.$id); $xoopsTpl->assign('lang_printerpage', _C_PRINTERFRIENDLY); $xoopsTpl->assign('lang_sendstory', _C_SENDSTORY); $xoopsTpl->assign('id', $id); } include XOOPS_ROOT_PATH.'/include/comment_view.php'; include_once XOOPS_ROOT_PATH.'/footer.php'; ?>[/code] ct_index.html [code] #tabmenu { color: #000000; border-bottom: 2px solid #cccccc; margin: 12px 0px 0px 0px; padding: 0px; z-index: 1; padding-left: 10px } #tabmenu li { display: inline; overflow: hidden; list-style-type: none; } #tabmenu a, a.active { color: #000000; background: #ffffff; font-family: Verdana, Arial, sans-serif; font-size: 11px; font-weight: normal; line-height: 2.0; border: 2px solid #cccccc; margin: 0; text-decoration: none; } /* For IE */ #tabmenu a, a.active { padding: 4px 5px 4px 5px;} /* and for other browsers */ html>body #tabmenu a, a.active { padding: 4px 5px 5px 5px;} #tabmenu a.active { background: #ffffff; /* Border bottom same colour as active page */ border-bottom: 3px solid #ffffff; } #tabmenu a:hover { color: #000000; background: #eeeeee; } #tabmenu a:visited { color: #000000; } #tabmenu a.active:hover { background: transparent; color: #000000; } #tabcontent { font: 0.9em/1.3em verdana, arial, sans-serif; background: #ffffff; padding: 20px; border: 2px solid #cccccc; border-top: none; z-index: 2; } #tabcontent a { text-decoration: none; } #tabcontent a:hover { background: transparent; }           [/code] Tip: To have your Content module display 'Main menu' items in the XOOPS main menu: 1) Disable XOOPS own 'Main Menu' block. 2) Enable the Content module 'Site Menu' block. 3) Hide the Content module in the site menu by entering a '0' instead of a '1' in XOOPS module admin. 4) Arrange the menu items by selecting 'Order Site Menu Block' in Content admin. Credits: davinci27 - for the very nice Content module. Kaotik - for a great beginners guide to using PHP and Smarty in Xoops.[/quote]" />

Re: Peekays Tab Hack for Content 0.5
by Peekay on 2007/1/29 23:21:12

Pretty Tabs for Content 0.5/6 - Silver Grad

This is a modified version of my original no-image CSS tabs.

* It uses just one image (less than 1 KB).
* It uses an accessible, unordered list to create the tabs.
* It works for me in IE6 (PC), Firefox (PC, Mac, Linux) Safari (Mac).

Resized Image

To use the tabs:

1) Install the tab hack.
2) Right-click on the image below (ctrl-click on a Mac) and choose 'Save image to disc'. Save the image as 'tabs_silver_grad.gif'.

..... Resized Image

3) Upload 'tabs_silver_grad.gif' to your Xoops/uploads directory.
4) Replace the Content module's 'ct_index.html' template with the code below (make a backup first).
5) In XOOPS admin/system/modules UPDATE the Content module to load the new template into the DB.

le="color: #000000"><?php <!-- Peekays Tab Hack Template : Silver Grad --> <!-- Upload tabs_silver_grad.gif to /uploads --> <style type="text/css"> #tabmenu { color: #000000; border-bottom: 1px solid #666666; margin: 12px 0px 0px 0px; padding: 0px; z-index: 1; padding-left: 10px } #tabmenu li { display: inline; overflow: hidden; list-style-type: none; } #tabmenu a, a.active { color: #000000; background: #ffffff url("<{$xoops_url}>/uploads/tabs_silver_grad.gif") repeat-x left top; font-family: Verdana, Arial, sans-serif; font-size: 11px; font-weight: bold; line-height: 2.0; border: 1px solid #666666; margin: 0; text-decoration: none; } /* For IE */ #tabmenu a, a.active { padding: 4px 5px 4px 5px;} /* and for other browsers */ html>body #tabmenu a, a.active { padding: 4px 5px 5px 5px;} #tabmenu a.active { background: #ffffff; /* Border bottom same colour as active page */ border-bottom: 1px solid #ffffff; } #tabmenu a:hover { color: #000000; background: #ffffff url("<{$xoops_url}>/uploads/tabs_silver_grad.gif") repeat-x left top; text-decoration: underline } #tabmenu a:visited { color: #000000; } #tabmenu a.active:hover { background: transparent; color: #000000; } #tabcontent { font: 0.9em/1.3em verdana, arial, sans-serif; background: #ffffff; padding: 20px; border: 1px solid #666666; border-top: none; z-index: 2; } #tabcontent a { text-decoration: none; } #tabcontent a:hover { background: transparent; } </style> <!-- Start unordered list loop --> <ul id="tabmenu"> <{foreach item=tab from=$tabs}> <li><{if $tab.storyid == $id}><a class="active" href="index.php?id=<{$tab.storyid}>"><{$tab.title}></a> <{else}><{if $tab.storyid != $id}> <a href="index.php?id=<{$tab.storyid}>"><{$tab.title}></a><{/if}><{/if}></li> <{/foreach}> </ul> <!-- End item loop --> <div id="tabcontent"> <{$content}> </div> <{if $xoops_isadmin == 1}> <div align="right"><a href="<{$xoops_url}>/modules/content/admin/index.php?op=submit&return=1&id=<{$id}>"><img src="<{$xoops_url}>/modules/content/images/add.gif" alt="" border="0" align="absmiddle"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<{$xoops_url}>/modules/content/admin/index.php?op=edit&id=<{$id}>&return=1"><img src="<{$xoops_url}>/modules/content/images/edit.gif" alt="" border="0" align="absmiddle"></a></div> <{/if}> <div class="printandemail"> <a href="print.php?id=<{$id}>" target="_new"><img src="<{$xoops_url}>/modules/content/images/print.gif" alt="" width="16" height="16" border="0" align="absmiddle"></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="<{$mail_link}>"><img src="<{$xoops_url}>/modules/content/images/email.gif" alt="" width="16" height="10" border="0" align="absmiddle"></a></div> </div> <{if $nocomments == 0}> <br /><br /> <div style="text-align: center; padding: 3px; margin: 3px;"> <{$commentsnav}> <{$lang_notice}> </div> <div style="margin: 3px; padding: 3px;"> <!-- start comments loop --> <{if $comment_mode == "flat"}> <{include file="db:system_comments_flat.html"}> <{elseif $comment_mode == "thread"}> <{include file="db:system_comments_thread.html"}> <{elseif $comment_mode == "nest"}> <{include file="db:system_comments_nest.html"}> <{/if}> <!-- end comments loop --> </div> <{/if}>


You can obviously mess with the CSS and use whatever background image you want.
Re: Peekays Tab Hack for Content 0.5
by Peekay on 2007/1/28 22:36:26

If you use Content 0.6, I have posted a small bug-fix connected with page titles in this post
Re: Peekays Tab Hack for Content 0.5
by Peekay on 2007/1/28 19:04:31

Don't forget that in XOOPS you need to update the module after replacing a template file. Otherwise the original template will remain in the DB.
Re: Peekays Tab Hack for Content 0.5
by domineaux on 2007/1/28 15:38:02

Quote:

Peekay wrote:
Hi domineaux.

There are a lot of postings in the Content module comments. (so many in fact it breaks the page). I think a lot are regarding the newer development where the dev is trying to incorporate a permissions system.

Content 0.5 installs just fine for me and works right out of the box, but I am using XOOPS 2.0.13.2. It may not work at all with a later version of XOOPS or PHP 5 or MySQL 5.

As far as the hack is concerned, simply replace 'index.php' and the template 'ct_index.html' as explained in my post #1.

If you want to try tabbed blocks, use the procedure in post #3, but use the amended code from post #6 to create the PHP file.


I'm on the latest XOOPS 2.0.X. The module appears to be working, but I'm not having much luck with the tabbed content. I think I'll take this project on next week.

Thanks for your response
Re: Peekays Tab Hack for Content 0.5
by Peekay on 2007/1/28 13:02:04

Hi domineaux.

There are a lot of postings in the Content module comments. (so many in fact it breaks the page). I think a lot are regarding the newer development where the dev is trying to incorporate a permissions system.

Content 0.5 installs just fine for me and works right out of the box, but I am using XOOPS 2.0.13.2. It may not work at all with a later version of XOOPS or PHP 5 or MySQL 5.

As far as the hack is concerned, simply replace 'index.php' and the template 'ct_index.html' as explained in my post #1.

If you want to try tabbed blocks, use the procedure in post #3, but use the amended code from post #6 to create the PHP file.

Who's Online

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


Members: 0


Guests: 194


more...

Donat-O-Meter

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

Latest GitHub Commits