Skip to Content Skip to Menu

How to edit CB login layout area when "logged in"

  • awwyeeaa
  • awwyeeaa
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
12 years 5 months ago - 12 years 5 months ago #200248 by awwyeeaa
Hello!

I am looking at the .php and .xml files of the login module for a way to edit what is displayed when a user is logged in. I'm really just looking to have spaces in between each part, and reduce the size of the avatar image in this area. As of yet I have been unsuccessful.

It's true that I am mostly learning Joomla as I go, so if anyone has any tips or suggestions to do this as easy as possible that would be great!

I included an image of the module as it looks when logged in, thanks team!

Attachments:
Last edit: 12 years 5 months ago by awwyeeaa. Reason: updated with more accurate info

Please Log in or Create an account to join the conversation.

  • sfraise
  • sfraise
  • OFFLINE
  • Posts: 96
  • Thanks: 14
  • Karma: 4
12 years 5 months ago #200264 by sfraise
In modules/mod_cblogin/mod_cblogin.php find the places that display the things you want to tweak such as where the img src is being called for the avatar and so on. Unfortunately many of the things you need to tweak either have inline styling or the tags don't have an id or class at all so you'll need to give them a class. For example, where it says <img src="blablabla... you can change it to <img class="mynewclass" src="blablabla... and then in a css stylesheet you can add the css tweaks to size or whatever you want to change.

In your case if it were me I would just wrap the entire thing in it's own div wrapper such as <div class="cbloginwrapper"> and from that point you can do much of what you need to do without having to give each single tag a class or id by doing something like .cbloginwrapper img { max-width:25px; line-height: 2px; } which will change the max width of all images within the cb login module assuming of course you want them all to be the same size, and will change the line spacing for the entire module.

Remember that you'll need to remove all of the inline styling for a tag if you want to change it through a css stylesheet, the inline style will always take priority over what's in the css file. Inline styles are places in the php file that say style="whatever".

Using inline styles are a pretty big pet peeve of mine, it makes it time consuming and difficult to change simple things quickly. The only time I ever see a need for it is in some certain situations where you need to set the style through javascript.
The following user(s) said Thank You: awwyeeaa

Please Log in or Create an account to join the conversation.

  • awwyeeaa
  • awwyeeaa
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
12 years 5 months ago #200275 by awwyeeaa
This was an excellent answer to point myself in the right direction!

Thanks!

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum