It is currently Fri Dec 15, 2017 5:54 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Mar 11, 2014 7:31 pm 
Offline

Joined: Tue Mar 11, 2014 7:19 pm
Posts: 4
Hi, Not sure what I am doing wrong as I can get frames to display correctly around my text or images however I am unable to centre the frame itself (NOT the text within the frame, that works OK).

For example I place and highlight the following in my article {AF width=30%}Your Content {/AF} and then select centre align, within the editor the text moves to a central position, however when I check the front end output. The frame is displayed left aligned and not in the centre of the screen.

I am using JCE Editor in Joomla 3.2.3

Please help!


Top
 Profile  
 
 Post subject: Unable to centre align frame.
PostPosted: Tue Mar 11, 2014 7:31 pm 
Top  
PostPosted: Wed Mar 12, 2014 12:48 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Is your site online? Can you post a link so I could check?

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
PostPosted: Thu Mar 13, 2014 11:49 pm 
Offline

Joined: Tue Mar 11, 2014 7:19 pm
Posts: 4
Hi,

I have created a test page at http://www.computerexpertonline.co.uk/test-page

I have enclosed an IE logo image and centrally aligned {AF width=30%} IE Logo {/AF} however as you can see the frame is left aligned on the webpage when I would expect to see it centrally in the column.

When I toggle the source in the editor it shows as follows:

<p style="text-align: center;">{AF width=30%} <img style="vertical-align: middle;" src="images/Articles/IE_Logo.png" alt="IE Logo" />&nbsp;{/AF}</p>

Regards


Top
 Profile  
 
PostPosted: Sat Mar 15, 2014 5:02 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
OK, this is a little tricky but possible.

You will need to change the code a little bit:
Open [joomla]\plugins\content\admirorframes\admirorframes\scripts\AF_helper.php
and change line 72:
Code:
$this->params['margin'] = (int) $this->AF_getAttribute("margin", $matchValue, $this->staticParams['margin']);

to
Code:
$this->params['margin'] = $this->AF_getAttribute("margin", $matchValue, $this->staticParams['margin']);


Change line 125:
Code:
table.' . $this->params['tableID'] . ', table.' . $this->params['tableID'] . ' tr, table.' . $this->params['tableID'] . ' td{border:none;margin:0;padding:0;}

to
Code:
table.' . $this->params['tableID'] . ', table.' . $this->params['tableID'] . ' tr, table.' . $this->params['tableID'] . ' td{border:none;padding:0;}


Now, in settings, you just need to set Float to None and Frame Margin to auto

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
PostPosted: Sun Mar 16, 2014 1:38 am 
Offline

Joined: Tue Mar 11, 2014 7:19 pm
Posts: 4
Hi Vasiljevski

I followed your instructions (the code change referred to line 125 was actually line 124 for me) and the frame around the picture now sits as required in the middle, thank you.

May I ask and sorry to be a pain, depending on an article and its layout there maybe occasions where a frame around text or a picture would look more suitable left aligned. I am assuming as the php had to be amended directly to allow central alignment it not possible to have some frames centrally aligned while others are left aligned.

Regards


Top
 Profile  
 
 Post subject: Re: Unable to centre align frame.
PostPosted: Sun Mar 16, 2014 1:38 am 
Top  
PostPosted: Sun Mar 16, 2014 2:51 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Well I didn't test it, but if you set Float to left and Margin to 0, frame should be aligned left.

You can achieve this by using inline params, for example:
Code:
{AF float="left" margin="0"}[content]{/AF}


More info on available inline params can be found here:http://www.admiror-design-studio.com/admiror-joomla-extensions/admiror-frames/manuals

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
PostPosted: Mon Mar 17, 2014 2:42 am 
Offline

Joined: Tue Mar 11, 2014 7:19 pm
Posts: 4
Hi Vasiljevski

Yes all working, thanks for the quick responses.

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group