Home arrow Forum
View config
  Welcome, Guest. Please login or register.
October 06, 2008, 11:30:56 PM
Home New Posts Search Calendar


Login with username, password and session length
Forum  |  Mambo 3rd Party Addon Hacks  |  Template Hacks  |  Topic: View config « previous next »
Pages: [1] Go Down Print
Author Topic: View config  (Read 7965 times)
Lifeischoice
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 26


View Profile
View config
« on: April 01, 2005, 11:48:21 AM »

I like the way one can change the view on your forum. Can you share how you configure your template to display the Wide View|Full View|Menu View feature for your forum? Thanks
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: View config
« Reply #1 on: April 01, 2005, 01:53:14 PM »

This feature depends on the template. If you look at your URL forum, there's an extra field which is "expv". I love to include this as a feature but not all templates are created wisely. It's just impossible for this to be a configurable feature.

If you are good in PHP, you may be able to modify your template to do this. If you are not, you can wait until I release template that makes use of this.

Here are the code details:

expv=0 - menu mode
expv=1 - wide mode
expv=2 - full screen mode

These points refer to my template only:

displays left menu if expv=0, hide if expv=1 or 2
Code:
<?php if ( mosCountModules("left") && $_REQUEST['expv'] == 0) { ?>
    <td width="150" valign="top" height="100%">
        <table class="moduletable-left" border="0" align="center" cellspacing="0" cellpadding="2" height="100%">
<tr><td valign="top"><?php mosLoadModules("left"); ?></td></tr>
</table>
    </td>
<?php ?>

adds the link on top of pathway "Wide | Full | Menu"
Code:

<?php
$pos strpos($_SERVER['REQUEST_URI'],"&expv=");
$wide = ($pos >= && !($pos === false) ? preg_replace("/&expv=[0-2]/s",'',$_SERVER['REQUEST_URI']) . "&expv=1" $_SERVER['REQUEST_URI']."&expv=1");
$full = ($pos >= && !($pos === false) ? preg_replace("/&expv=[0-2]/s",'',$_SERVER['REQUEST_URI']) . "&expv=2" $_SERVER['REQUEST_URI']."&expv=2");
$short = (($pos >= && !($pos === false) || $pos === false) ? preg_replace("/&expv=[0-2]/s",'',$_SERVER['REQUEST_URI']) . "&expv=0" $_SERVER['REQUEST_URI']."&expv=0");
if ($mosConfig_sef == '1') {
$wide sefRelToAbs(substr($wide,1,strlen($wide)));
$full sefRelToAbs(substr($full,1,strlen($full)));
$short sefRelToAbs(substr($short,1,strlen($short)));
}
$expand $_REQUEST['option'] != "com_smf" '' '<table class="expandtext" width="100%" align="center"><tr><td width="100%" align="center"><a href="'.$wide.'" class="expandtext">Wide View</a> | <a href="'.$full.'" class="expandtext">Full View</a> | <a href="'.$short.'" class="expandtext">Menu View</a></td></tr></table>';
?>

<br /><?php echo $expand?><div id="pathway_outline">
<div id="pathway"><?php mosPathWay(); ?></div>

makes it full screen if expv=2
Code:
<?php $main ob_get_contents(); ob_end_clean(); MH_get_layout($main,($_REQUEST['expv'] == "99%" "760")); ?>
« Last Edit: April 01, 2005, 06:58:27 PM by admin » Logged
Lifeischoice
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 26


View Profile
Re: View config
« Reply #2 on: April 01, 2005, 04:11:10 PM »

Thanks a lot.  I am not fluent in php yet but I will give it a twirl this weekend. In the meantime, I will look forward to your template release.
Logged
lawman
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 25


View Profile
Re: View config
« Reply #3 on: April 05, 2005, 02:59:54 PM »

At the risk of sounding stupid... this code goes in the mambo template index.php file, right?

I gotta have the Wide View|Full View|Menu View thingy but I'm getting over my head.

www.raov.net
Logged
Lifeischoice
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 26


View Profile
Re: View config
« Reply #4 on: April 07, 2005, 10:53:19 PM »

As far as I can tell, yes.
Logged
lawman
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 25


View Profile
Re: View config
« Reply #5 on: April 08, 2005, 07:53:40 AM »

I tried to make it work and couldn't get it... so I made another template without the right columns and assigned that one to the forum menu with a choice to go to a smaller forum on the top menu. Works fine... just not as sexy as Admins.  Wink

www.raov.net
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: View config
« Reply #6 on: April 08, 2005, 03:45:13 PM »

looks nice lawman!
Logged
Eidolon
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: View config in a little bit more detail, :)
« Reply #7 on: June 03, 2005, 02:20:47 AM »

Hey,
  I am using SMF and mambo thanks to your mod but I would love it to have no menu and still be in a wrapped view, something like what you call expv,1 or what lawman did. Im kinda a um..PHP..novice?..heh and if you could elaborate more on how I would go about doing this that would be great, thanks either way!  Kiss

-Tim
Logged
Pages: [1] Go Up Print 
Forum  |  Mambo 3rd Party Addon Hacks  |  Template Hacks  |  Topic: View config « previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE