joeh1990 Posted March 7, 2012 Share Posted March 7, 2012 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: Viewing someone elses profile layout: 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 Quote Link to comment https://forums.phpfreaks.com/topic/258483-layout-being-altered-by-ob_start-function/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.