The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Thu Feb 18, 2010 9:31 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
Hello!

This question relates to the MilkyWay template.

For website text articles I have been adding through the JCE editor the following (in an opening division tag): "border: thin solid #e1b9a2; padding: 10px;" This takes care of the blog column home page intro and the full article when the readmore is clicked.

It has been suggested I could save some work by hard coding this into template.css. I have alread modified font and color in the template.css but haven't figured out where to put the above items. I have tried different things and produced whole page borders and column borders. Just no simple article borders.

A search here brought up image border questions but I didn't find one for texts.

Any suggestions will be appreciated.

Thanks much!

Lowtech

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 2:57 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Feb 19, 2006 6:47 pm
Posts: 17259
Location: Toledo, OH
Code:
<div style="border: thin solid #e1b9a2; padding: 10px;">
<jdoc:include type="component" />
</div>

_________________
Don't HACK the Joomla! core. Extend and Override.
http://harpervance.com - Live Joomla! Help Available skype: harpervance


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 3:54 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
Thanks so much!
I never thought to look at the HTML. I was only looking at the css.
But I am not sure where to insert it. I have tried several different places and I have gotten funny results, such as articles repeated as full width on the home page. :)
Could you suggest an insertion point? The HTML is stock (no customization).

Thanks again!

Lowtech

ranwilli wrote:
Code:
<div style="border: thin solid #e1b9a2; padding: 10px;">
<jdoc:include type="component" />
</div>

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 4:02 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Feb 19, 2006 6:47 pm
Posts: 17259
Location: Toledo, OH
It's in index.php in your template.

_________________
Don't HACK the Joomla! core. Extend and Override.
http://harpervance.com - Live Joomla! Help Available skype: harpervance


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 4:26 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
Thank you!

I have the file open. But where to insert it? I confess I know no PHP except I know what to do what I am told :)

I have it open in cPanel for code editing and it shows the line numbers so either a line number or name of section might help.

Thanks again.

Lowtech

ranwilli wrote:
It's in index.php in your template.

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 4:31 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Feb 19, 2006 6:47 pm
Posts: 17259
Location: Toledo, OH
Forgive me, but I have no idea even what template you're using, let alone what line number that statement is on.

Search for "component", you'll find it.

_________________
Don't HACK the Joomla! core. Extend and Override.
http://harpervance.com - Live Joomla! Help Available skype: harpervance


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 4:49 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
Yes. The template is the standard Joomla Rhuk_MilkyWay.

There is presently no "<div style= etc" statement in the index.php file so I am at a loss. I have made a screen capture of the part of the file that seemed promising but I have not found the right place to insert the code :)

So I thank you for taking the time, once more.

Lowtech

ranwilli wrote:
Forgive me, but I have no idea even what template you're using, let alone what line number that statement is on.

Search for "component", you'll find it.


You do not have the required permissions to view the files attached to this post.

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 4:53 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Feb 19, 2006 6:47 pm
Posts: 17259
Location: Toledo, OH
You have to put the <div> in around the <jdoc> statement.

_________________
Don't HACK the Joomla! core. Extend and Override.
http://harpervance.com - Live Joomla! Help Available skype: harpervance


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 5:20 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
Yes. It seems that when I do that, I get a 1 pixel border around the entire center column, not individual articles.

I attach a screen capture in which I have greatly shrunk the page to show as much as possible. Each intro in the blog column has a hand coded red line around it , such as the article on "Americanism." I removed that hand coded line from the second article, "The Church and Humanity," as a test case for trying to hard code the blog intro border. What I have now is a red border that encompasses all four blog article intros surrounding the hand coded borders I left in. I put the div tag under <table class=nopad><tr valign=top><td>.That is how it stands at this point.

Much appreciated!

Lowtech

ranwilli wrote:
You have to put the <div> in around the <jdoc> statement.


You do not have the required permissions to view the files attached to this post.

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Fri Feb 19, 2010 5:32 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Feb 19, 2006 6:47 pm
Posts: 17259
Location: Toledo, OH
Sorry, I thought that's what you wanted... Remove the div from the template.

Have a look instead at the various /components/com_content/view/.../default.php files

(the "..." is article, category, front page, and section)

In each you'll see where the <?php echo $this->article->text; ?>

statement is... that's the statement you'll want to put your div(s) around.

Also See: Template Over Rides...

That way, when Joomla is upgraded, your hack(s) won't be overwritten.

BTW you Might want to consider using two divs - one for padding top and bottom, the other (inside the first) with margins left and right. This MIGHT save you problems with IE (broken box model).


Good Luck!

_________________
Don't HACK the Joomla! core. Extend and Override.
http://harpervance.com - Live Joomla! Help Available skype: harpervance


Top
 Profile  
 
PostPosted: Mon Feb 22, 2010 10:55 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
Well, I have had some success. I created in the rhuk_milkyway html folder a sub-folder called component_com and in that a subfolder another called article and I copied the corresponding article file and placed it there. I edited the file by adding the div tags for the 1 px outline and Voila! The 1 px outline appears on the article pages as intended!

But, and this is frustrating, I could not find the article->text lines in any of the others, ie, front page, section or category. The outline does not appear on the front page because I don't know where the div tags should go! Perhaps there is somewhere else or some other echoing language I should be looking for?

Much thanks,

Lowtech






ranwilli wrote:
Sorry, I thought that's what you wanted... Remove the div from the template.

Have a look instead at the various /components/com_content/view/.../default.php files

(the "..." is article, category, front page, and section)

In each you'll see where the <?php echo $this->article->text; ?>

statement is... that's the statement you'll want to put your div(s) around.

Also See: Template Over Rides...

That way, when Joomla is upgraded, your hack(s) won't be overwritten.

BTW you Might want to consider using two divs - one for padding top and bottom, the other (inside the first) with margins left and right. This MIGHT save you problems with IE (broken box model).


Good Luck!

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Mon Feb 22, 2010 11:05 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sun Feb 19, 2006 6:47 pm
Posts: 17259
Location: Toledo, OH
Each "View" of content_com has its own default.php, you'll have to do them all to get that effect everywhere.

_________________
Don't HACK the Joomla! core. Extend and Override.
http://harpervance.com - Live Joomla! Help Available skype: harpervance


Top
 Profile  
 
PostPosted: Mon Feb 22, 2010 11:59 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
I think I created a separate view with each default.php imported into the new template com_content folder. But, to take the example of the frontpage default.php, there is no place to add the desired div tags.

I attach a WORD.doc of that file, if that works (site won't accept html and I don't know how to jpg it), and possibly my denseness can be penetrated with a gentle prod! :)

Thanks much,

Lowtech


ranwilli wrote:
Each "View" of content_com has its own default.php, you'll have to do them all to get that effect everywhere.


You do not have the required permissions to view the files attached to this post.

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Thu Jun 16, 2011 2:26 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Jan 06, 2009 9:39 pm
Posts: 196
Hello!

Sixteen months late, but I found one possible answer for putting a border around articles on the frontpage. (In Joomla 1.5.23)

After you have copied your com_component views to your template (I am talking about rhuk_milkyway, the only one I know anything about!)
You should have copied your frontpage view to here: rhuk_milkyway=>html=>com_content=>fontpage=>default.php

Open default.php and using the empty <div>tag at about line 11, stick in your styling. I attach a screen shot of the inserted styling. I needed the margin-top to separate the article intros. I still haven't figured out how to put the button headings for the icons above and outside of the articles but except for that it works. You will also have to install similar styling in your article default.php for the subsequent pages of the articles on the inside, as described above on this page.

Don't forget to delete the styling you now have in your individual articles or you may end up with double borders, etc.

Give it a try and see if it works for you. ;D

Best,

Lowtech

PS

I am posting this solution in a couple of places. :)


You do not have the required permissions to view the files attached to this post.

_________________
That one may smile and smile, and be a villain.
-Wm. Shakespeare, Hamlet, Act 1, Sc. 5.


Top
 Profile  
 
PostPosted: Mon Jun 20, 2011 4:35 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Jun 20, 2011 4:20 am
Posts: 1
Thank you so much, it solves the problem for me. ;D


Top
 Profile  
 
PostPosted: Thu May 10, 2012 9:40 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Apr 25, 2012 1:46 pm
Posts: 5
Location: Scottburgh, South Africa
ranwilli wrote:
Code:
<div style="border: thin solid #e1b9a2; padding: 10px;">
<jdoc:include type="component" />
</div>


Hi Ranwilli

Thanks for this info, I have inserted the border and works 100%. If could please let me know how to now round the corners, that will be greatly appreciated.

Cheers,
Mike


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



Who is online

Users browsing this forum: No registered users and 5 guests


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

Jump to:  
Powered by phpBB® Forum Software © phpBB Group