reviewing xhtml elements: block vs inline

June 11th, 2009 by amatesi

Today I was reviewing some XHTML syntax. This post is a placeholder for me to remember wich ones are CSS block elements and wich ones are CSS inline elements.

The difference between the two is, according to the specifications, that a block-level element can contain other elements (block-level and inline elements); an inline element can only contain one or more inline elements, but not block-level elements.

The block-level elements:

  • h1, h2, h3, h4, h5, h5
  • p
  • div
  • blockquote
  • ul and ol
  • forms

The inline elements:

  • em
  • strong
  • cite
  • a
  • img

a cool example

<p>

     <strong>

          <em>

               <a href="http://www.pwrusr.com/">pwrusr.com

               </a>

          </em>

     </strong>

is a site for 

     <cite>power users!</cite>

</p>

an important rule: symmetry aka we have to strive to keep opening and closing tags ordered simmetrically.

Bookmark and Share

Posted in Web Master, Web Standards | No Comments »

[SOLVED]Cannot login to Joomla backend as admin

February 11th, 2009 by amatesi

Recently I encountered a whole load of problems related to Joomla and my new business open source web site.

Here I’m gonna post some general info and experiences, useful to troubleshoot possible joomla problems, especially related to when you’re unable to login to the administrator backend (I know how it feels, just free your mind: computers are numbers and circuits).

What I am sharing here is my reaction to frustration, with suggestions and feedback received from the official joomla! forum and the official joomla! italian community (thanks – you know who you are).

please check here: http://forum.joomla.it/index.php/topic,56790.0.html and

and here: http://forum.joomla.org/viewtopic.php?f=431&t=262426

The first thing I feel to suggest you is to check configuration.php and .htaccess files on you site’s root.

It’s important for configuration.php not to contain any blank lines; also, check this file in respect to the Linux/UNIX text file conventions. On Windows, text file lines’ are terminated with a CRLF, on Linux/UNIX instead, the lines of a text file are terminated with just a LF (for a tutorial on what that means, check here: http://usertools.plus.net/tutorials/id/22).

The .htaccess (on the contrary of configuration.php), may contain blank lines, just make sure that, if any, they respect the ‘foretold Linux/UNIX text file conventions (lines have to be ended by LFs); also, check and make sure the rules are correct and there are no hidden CRLF after the rules declarations (in case of doubt, restore the original htaccess.txt from an untouched joomla! build).

From my experience, those checks helped me solve my admin loop, cannot login problems; an obvious way to avoid this kind of problems is to become a power user on the Linux side (aka pwrusr), but that’s a personal choice! If working directly on your joomla! site with, say, Ubuntu, these problems would’nt have ever happened to any of us (I admit it: I was jerking on my site with my powerful Vista64 gaming rig).

Another useful thing to check for, is to make sure you have the right PHP version: make sure your host is serving you with PHP 5 (since joomla was made with it). How to discover if you have PHP5 if you can’t access the admin backend? Well, upload on your site’s root the uncompressed file JTSPOST (here: http://joomlacode.org/gf/project/jts/frs/), and open the address corresponding to the copied file’s name. Once you open it up, it’s gonna give you some useful info about joomla! and your server, included what php version you have.
Please remeber that if you happen to fix your problem, then remove JTSPOST from your server’s root, because if you forgive it there, you may leave a possible information security hole.

OK, so, going on, as I said, I checked the joomla! official forums, and referred to them for other possible problems and related suggestions, wich I will report here for the sake of completeness (note that I edited some parts for some added clarity):

Suggestion n.1)

  1. edited the file administrator/components/com_login/admin.login.php to comment out line 69 (//LoginController::display() )
  2. browsed to the login page.
  3. [tried to login] and got an ‘Invalid token‘ message.
  4. Reedited the [administrator/components/com_login/]admin.login.php file to remove my comment at line 69.
  5. Refreshed the login page in my browser and got the normal login form.
  6. Logged in [successfully].

 try this and if it doesn’t work, then:

Suggestion n.2) [user inoxfire]

  1. edit file administrator/components/com_login/admin.login.php [to comment out line 57, // JRequest::checkToken('request') or jexit( 'Invalid Token' );]
  2. browsed to the login page.
  3. [tried to login] and got an ‘Invalid token‘ message.
  4. Reedited the [administrator/components/com_login/]admin.login.php file to remove my comment at line 57.
  5. Refreshed the login page in my browser and got the normal login form.

 try this and if it doesn’t work, then:

Suggestion n.3)

  1. Log into phpMyAdmin and navigate to the jos_plugins table.
  2. Look for the "User – Joomla!".
  3. Ensure that it is published as mine was not (set published to 1 just in case).
  4. [Look for] in row "Authentication – Joomla"
  5. Ensure that it is published as mine was not (set published to 1 just in case).

 try this and if it doesn’t work, then:

Suggestion n.4)
  1. first check your Super Admin status:
    [Open PHPmyAdmin] in the "jos_users" table set SuperAdmin to:
    – field "id" – value "62"
    – field "gid" – value "25" or "26".
  2. in the "jos_core_acl_aro" table find row for "62":
    – field "id" – write this down (should be 10 normally) – this is the "aro_id".
  3. in the "jos_core_acl_groups_aro_map" table find row for "aro_id" = 10
    – "group_id" should be "25" or "26".

BONUS:

If, for some reasons, you need to reset your joomla! admin password, or if you need to offer admin access to somebody else, or for whatever the reason, please change it by doing so:

  1. Open PHPmyAdmin.
  2. access your joomla DB and goto table jos_users.
  3. modify "admin"-row and set it’s password code to this: 21232f297a57a5a743894a0e4a801fc3 (it’s the equivalent of ‘admin‘).

(for more info and explanations, check this post over here: http://forum.joomla.org/viewtopic.php?t=10985).

Hope this info is useful for everyone, and wish you all have a good time.

Bookmark and Share

Posted in Joomla, Web Master | 52 Comments »

This Page Is (NOW) Valid XHTML 1.0 Transitional!

February 1st, 2008 by amatesi

Happy day, today: My personal weblog is now Valid XHTML 1.0 Transitional. I’ve made essential corrections needed to clean the code.
As promised previously, on an older post (look here), I was struggling to make this template and related modifications, Valid XHTML 1.0.

Now I finally made it!

The magic between PHP, CSS, JAVASCRIPT and XHTML became something that every browser should be able to correctly interpret and render…OK, I know, there is that overlap between titles…and still no pictures…one thing at a time.

I wish to publicly thank the creators of WordPress and the creators of the template (& related), Six Shooter Media: Thank you for your work.

For now, you can click the menu keyword called “XHTML“, on your right, in the Sidebar, below “META”, and see for yourself.

…finally looks like not all the web is crap, or at least, mine isn’t ;-)

Andrea Matesi

Bookmark and Share

Posted in Web Master, Web Standards | No Comments »

All the web is crap…?

November 29th, 2007 by amatesi

This is about validation and clean coding techniques.

Recently, by browsing the web, I stuck at the w3c validator. Everybody knows it, everybody use it…or everybody ignores it?
Maybe latter is true!

Let’s start from the basics: after some modifications made to this current template (typography), thought about the (in)famous W3C Validator.
So, clicking at the link on the sidebar, near the end where it says “Valid XHTML”, was redirected there.
After the check, I found something like 12+ errors! Amazing! I just installed WordPress, added some plugins, added this nice theme and wrote some random articles. The bad results, were in some way related to dumb errors, made by me when I first inserted content (I wrote directly, in place of putting code, so I forgot hyphens, etc.).
Then I tried to figure my errors (and try to solve them). I solved the solvable, the others are in my “future tasks” list, maybe someday I’ll figure them out.
In conclusion, for W3C Validator my site is crap.

Once I was there, I decided to give it a try once more and test some of the “big guns”, to see if they were good enough to pass the Validation process… surprise, surprise!

  • Microsoft.com is giving TONS of errors, but they may pass – MS generally tend to live inside it’s separate world.
  • SUN.COM is, like MS, a site full of crap, coded by people that don’t care about Open Standards.
  • DELL.COM results in 143 Errors, maybe the guys at Dell aren’t so synchronized about the creation of a standards conforming WebSite?
  • Even GOOGLE.COM, an example of clean, compact, fast and efficient website, results on, uhm, let’s see…there are 30 Errors!!!
  • Not talking of the mighty ADOBE.COM, THE contributors of a huge piece of the actual web – 7 errors.

And the list goes and goes and goes…For me this is simply incredible! Who’ll ever say that? The most expanded Operating System in the World, paired with the First Supporters of Open Source Software, followed by one the biggest HW Company in the WORLD, and neared by the BEST Search Engine of Earth, not to say about the BEST Web Editing & Graphics Software Company simply don’t care to have a “Standards Compliant Web Site”.

Now, if the “big guns” really don’t care about it, why should I?

My only consolation stands here: www.sitepoint.com results in only ONE error, and they don’t even sacrifice one bit of information, offering RICH content and 99.9% compliance.
Now that’s the way web sites get done, and sooner or later I will try and best their result on mine (even if this means a complete rewrite of the template). I can get no…

BTW, are we so sure W3C Validator is up to its task?

Update 25/dec/2007: My new search does give the INTERNATIONAL STANDARD ORGANIZATION (http://www.iso.org), as a “Non Valid” web site!
LOL! Even ISO don’t care about web standards.

Bookmark and Share

Posted in Web Master, Web Standards | 1 Comment »

Joomla & Flash intro welcome (or splash) page integration

November 18th, 2007 by amatesi

My first post is gonna talk about the nice integration often searched by people ’round the web…
Enter Joomla & Flash Integration:

Quickstart for the impatient
1) Create a Section/Category/Content of your choice (say “intro”).
2) Create a void Joomla theme (go to compassdesign, they have an already made one).
3) Customize the template to your needs (insert Flash intro in that case).
4) Upload the template to your Joomla install and associate it to the “intro” Section.
5) Set the intro section as your first mainmenu entry and give it “Special” permissions.

…done: your site now will have a nice Flash intro!

For the less impaired, here a more detailded descriptive explanation:

As in point 1), you were taught to create an ex-novo section, this way you have a brand new section whom to associate a custom template. So, as usual, “New” -> “Section” and name it (whatever you want); “New” -> “Category” and name it then “New” -> “Content” and save, then create a new menu entry called “intro” wich connects to this section.

Next we need a null basic template for joomla, go get yours at www.compassdesigns.net (note you have to register, so proceed and search for Blank site template).

When you have it, open it up with your fav text editor (mine is PSPad) and customize it with your code (find the body and insert your splash intro code there); [here I'm not gonna go with many details: you have to know some basic (X)HTML on you own before doing that].

Now upload your hand-modified template as usual from the Joomla backend (“Install” -> “Templates”)

Then go to “template chooser” and open your listed template; from there “associate” the template to your “Menu Voice” (via the “Associate” button up-right.

Bookmark and Share

Posted in Joomla, Web Master | 7 Comments »