Unable to centre align frame.

Admiror Frames gives the ability to add decorative frame around content, no matter what the content is.
There are a few templates to chose from and you can adjust frames to fit your site design.
Admiror Frames is a nativ Joomla! 2.5, Joomla! 1.7, Joomla! 1.6 and 1.5 Content plugin. One instaler for all Joomla! versions, except 1.0.
Post Reply
Message
Author
freddiesfather
Posts: 4
Joined: Tue Mar 11, 2014 7:19 pm

Unable to centre align frame.

#1 Post by freddiesfather »

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!

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Unable to centre align frame.

#2 Post by Vasiljevski »

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

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

Re: Unable to centre align frame.

#3 Post by freddiesfather »

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

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Unable to centre align frame.

#4 Post by Vasiljevski »

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: Select all

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

Code: Select all

$this->params['margin'] = $this->AF_getAttribute("margin", $matchValue, $this->staticParams['margin']);
Change line 125:

Code: Select all

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

Code: Select all

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

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

Re: Unable to centre align frame.

#5 Post by freddiesfather »

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

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Unable to centre align frame.

#6 Post by Vasiljevski »

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: Select all

{AF float="left" margin="0"}[content]{/AF}
More info on available inline params can be found here:http://www.admiror-design-studio.com/ad ... es/manuals
Help Admiror Gallery become even better,
give us a review on JED

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

Re: Unable to centre align frame. (SOLVED)

#7 Post by freddiesfather »

Hi Vasiljevski

Yes all working, thanks for the quick responses.

Regards

Post Reply