EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Re: Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 02:09:24 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:55:53 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 01:47:42 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:34:07 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 12:20:17 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Recent Topics ezBlock

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Where is the facebook button color? by EzPortal
February 28, 2023, 06:45:09 pm

Display on Mobile - SMF 2.1.3 and EZ 5.5.2 by BugginIn
December 29, 2022, 04:07:13 pm

Blocks Help by Riggs1973
November 20, 2022, 12:59:30 pm

Surface ol lite theme release Free! by Steffen K.
November 18, 2022, 03:57:24 am

Undefined index: href by EzPortal
October 04, 2022, 08:49:59 pm

SMF-ezportal_column_5.cache): failed to open stream: No such file or directory by EzPortal
June 04, 2022, 11:40:13 am

Arcade block error: failed to open stream: No such file or directory by Shades
May 20, 2022, 02:47:13 pm

Author Topic: hiding the block frame  (Read 6239 times)

0 Members and 1 Guest are viewing this topic.

Offline thellie

  • Posts: 8
  • Karma: 0
hiding the block frame
« on: August 02, 2010, 03:28:28 am »
hi there,
APOLOGY - this was in the wrong forum for a while until i realised my mistake... (note to admin - it's still there as i can't delete or move it, and i can't report it to the moderator either...)

anyway... i've just installed ezportal, and am coming to terms with the setup - i like it, despite the headache the php block type gave me for a couple of hours :)

up to now i have used the ad management mod to insert ads/info around the site, but so that i can cut down on using width unnecessarily, i've put a vertical lefthand column ad into a ezblock...

...works as it should, but as it's an image-based add, i'd like to hide the frame block structure, so that the ad sits (or appears to) floating on the left... with the other lefthand ezblocks above and/or below it.

is this currently possible without recoding, or recoding very much? it would need to be on a 'per block' level...

maybe 2 or 3 choices:
1 frame on
2 frame off
3 frame off, title on...?

i'm running this locally so can't show you an up to date version, but the original site is below - the ad is the trekking ad...

http://www.mirrorartgroup.org/newsletter/mirrorforum/

cheers

EDIT: sorry, had another thought too... whether it's possible to enable scrolling and fixed depth of a box?

Offline JohnR

  • Posts: 10
  • Karma: 1
Re: hiding the block frame
« Reply #1 on: August 06, 2010, 12:50:11 pm »
Here is a hack that will allow block headers to be hidden in SMF2 (if you enter [hide] (with square brackets) BEFORE the block title then it will hide the header).   It also uses a drop shadow on header blocks and no shadow on headerless blocks (pretty obvious what you need to change to modify that behaviour)

File modified is /themes/default/EzPortal2.template.php around line 1430 (replace the section between Function ShowEzBlocks... and  ....   // Check the ezblock type):

Code: [Select]
function ShowEzBlocks($ezColumn)
{
global $context, $txt, $settings, $scripturl, $ezpSettings;

    if(empty($ezColumn['blocks']))
         return;

    echo '<table class="table_list" width="100%">';

foreach($ezColumn['blocks'] as $ezBlock)
{
// @@@ edit to NOT show header if the block title start with [hide]
if (strtolower(substr($ezBlock['customtitle'],0,6)) != '[hide]')
{ echo '
<tbody class="header">
<tr>
<td class="catbg"><span class="left"></span>';
// Check if they can collapse the ezBlock
if ($ezBlock['can_collapse'])
//@@@ edited to align collapse icon in center vertically
echo ' <span style="float:right"><img src="' . $settings['images_url'] . '/' .( $ezBlock['IsCollapsed'] ? 'expand.gif' : 'collapse.gif' ). '" onclick="javacscript:EzToogle(\'block',$ezBlock['id_layout'],'\',',$ezBlock['id_layout'],',this,1)" alt="+-" style="margin-top:0.6em;"/></span>';
// Show icon
if (!empty($ezBlock['icon']))
echo '<img src="',$ezpSettings['ezp_url'],"icons/" . $ezBlock['icon'] . '" alt="" /> ';
// Show title of ezBlock
echo $ezBlock['customtitle'];
if (($context['ezportal_block_manager'] == 1 || $ezBlock['IsManager'] == 1) && empty($ezpSettings['ezp_hide_edit_delete']))
{
echo ' <a href="',$scripturl,'?action=ezportal;sa=editblock;block=',$ezBlock['id_layout'],'"><img src="',$ezpSettings['ezp_url'],'icons/page_white_edit.png" alt="',$txt['ezp_edit2'], '" /></a>
&nbsp;
<a href="',$scripturl,'?action=ezportal;sa=deleteblock;block=',$ezBlock['id_layout'],'"><img src="',$ezpSettings['ezp_url'],'icons/plugin_delete.png" alt="',$txt['ezp_delete2'], '" /></a>';
}
echo '</td>
</tr>
</tbody>
<tbody class="content" >
<tr class="windowbg2" style="border:0;">
<td id="block',$ezBlock['id_layout'],'" ',($ezBlock['IsCollapsed'] ? 'style="display:none"' : 'style="border-left:solid 4px lightgrey;border-bottom:solid 4px lightgrey;"'),'>
';
//@@@
}
else
{ // block without header can't be collapsed and hasn;t got a shadow
echo '
<tbody class="content" >
<tr class="windowbg2" style="border:0;">
<td id="block',$ezBlock['id_layout'],'" >
';
}
//@@@

// Check the ezblock type

NOTE: this is offered without support - you should NEVER attempt to modify source files without making a backup copy first OR if you aren't sure what you are doing!

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
7657 Views
Last post December 17, 2008, 07:10:57 pm
by EzPortal
2 Replies
12604 Views
Last post July 14, 2009, 02:36:31 pm
by EzPortal
1 Replies
7123 Views
Last post September 06, 2009, 09:21:04 am
by EzPortal
0 Replies
11498 Views
Last post July 28, 2010, 03:01:36 am
by thellie
1 Replies
14962 Views
Last post January 07, 2020, 08:21:08 am
by EzPortal

+-SMF Gallery

Quick Menu


Powered by EzPortal