Jump to content

Layout being altered by ob_start function


joeh1990

Recommended Posts

Hello there, I hope one of your users can help me!

 

I'm running a website with Joomla and I have the Community Builder extension (that is much like Facebook) along with 3rd party integrations that enable certain tabs to display in the user's profile.

 

The problem I'm having with one of the 3rd party plugins in that the layout is changing between users that are logged in and of whom the profile belongs to, and those who are viewing the page that are just viewing the other person's profile. I have located the problem to be within the "if( $this->isOwner( $user ) )" function that is towards the beginning of the php code. Please take a look at the image examples below to understand what I mean in terms of the effect it is having on the layout for unregistered and registered/logged in users:

 

User owned profile layout:

user-owned-profile.jpg

 

Viewing someone elses profile layout:

viewing-another-users-profile.jpg

 

This is the code that enables the extra content for the 'owner' of the profile

 

ob_start();

if( $this->isOwner( $user ) )

{

?>

<div id="easyblog-app-wrapper" class="ezb-postToWall">

<div id="dashboard-actions">

<span class="dashboard"><a href="<?php echo JRoute::_('index.php?option=com_easyblog&view=dashboard&Itemid='.$itemidDashboard); ?>"><?php echo JText::_('Dashboard');?></a></span>

<span class="write"><a href="<?php echo JRoute::_('index.php?option=com_easyblog&view=dashboard&layout=write&Itemid='.$itemidDashboard); ?>"><?php echo JText::_('Write Entry');?></a></span>

<span class="settings"><a href="<?php echo JRoute::_('index.php?option=com_easyblog&view=dashboard&layout=profile&Itemid='.$itemidDashboard); ?>"><?php echo JText::_('Settings');?></a></span>

</div>

 

(the dashboard part gives options for the owner to write blogs and edit settings when they are viewing their own profile).

 

All I require is this first div

<div id="easyblog-app-wrapper" class="ezb-postToWall">
to be part of the content that is viewable to 'non-owners' AS WELL AS OWNERS in order for everyone to see the same correct layout.

 

However, when I place this further down in the code that is viewable by everyone instead of where it currently is, this interrupts all of the content that is for 'owner viewing only' on the profile.

 

So the question is, where do I place the

<div id="easyblog-app-wrapper" class="ezb-postToWall">
so that it works for both 'owner' and 'non-owner'? Or how else do I alter the code so that the div is viewable by everyone...

 

Please find attached the full script if it is required.

 

Thank you very much for your help, sorry if I haven't explained it so well...

17731_.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.