Recent Topics

1 Apr 24, 2008 14:09    

My b2evolution Version: 2.4.1

Hi

I was just writing up about a little hack I did to User Tools and the output is weird.

Take a look, I'm sure I can get rid of it by rewriting but I'm leaving it there for a while for all to see.

http://eu.rogerlovejoy.eu/blog4.php/2008/04/24/user-tools-hack

The third line of the ordered list is large and bold.

The text I wrote is fine.

<ol>
  <li>I removed some options and changed some output text, which put me back as they all came back up on reinstalling. Still had the XHMTL errors</li>
  <li>Realised I had only altered the GUI admin options, not that displayed and found the other bit of code and removed some of the 'display' parameters. This was better the output was fine but I still had 3 errors</li>
  <li>On further investigation I realised I could maybe remove the parameter and all is fine. :)

[Block] part, which was of course the title 'User Tools' which had the H2 tag that cause the errors. Had to go back and remove the last [/Block] 

I had to remove the User Tools block as it was an H2 tag, which doesn't fit in the position I placed the widget - the 'menu'.
</li>
 
</ol>


The code when viewing source on the actual page shows the P tag around the sections of the third list item.

<ol>
  <li>I removed some options and changed some output text, which put me back as they all came back up on reinstalling. Still had the XHMTL errors</li>

  <li>Realised I had only altered the GUI admin options, not that displayed and found the other bit of code and removed some of the ‘display’ parameters. This was better the output was fine but I still had 3 errors</li>
  <li><p>On further investigation I realised I could maybe remove the parameter and all is fine. <img src="http://eu.rogerlovejoy.eu/rsc/smilies/icon_smile.gif" alt=":)" class="middle" /></p>

<p>[Block] part, which was of course the title ‘User Tools’ which had the H2 tag that cause the errors. Had to go back and remove the last [/Block] </p>

<p>I had to remove the User Tools block as it was an H2 tag, which doesn’t fit in the position I placed the widget - the ‘menu’.</p>

</li>
 
</ol>

Thanks for looking at this :-/

2 Apr 24, 2008 14:15

It's a combination of these 2 bits of css, effectively you're saying font-size: 1.2em * 1.2

.bText p {
	line-height: 1.5em;
	padding: 0px 6px 6px 16px;
	text-align: justify;
	font-size: 1.2em;
}


.bText ol {
	line-height: 1.2em;
	margin-left:10px;
	margin-top:-10px;
	padding: 0px 6px 6px 32px;
	text-align: left;
	font-size: 1.2em;
}

¥

3 Apr 24, 2008 14:33

Ok ¥åßßå thanks.

I can see that the css can do that, but I don't have any p tags in the ol tag.

Well I mean I can see its there in the source code (second piece of code I showed) but its not there in the text I entered (first part of code I entered)

So whereas I'm glad you've pointed out a problem with the css, it shouldn't have mattered in this case as the p tag wasn't used ?

4 Apr 24, 2008 14:36

I have edited the text on the post it is now:

<ol>
  <li>I removed some options and changed some output text, which put me back as they all came back up on reinstalling. Still had the XHMTL errors</li>
  <li>Realised I had only altered the GUI admin options, not that displayed on the menu bar. Found the 'display' code and removed some of the parameters. This was better the output was fine but I still had 3 errors</li>
  <li>On further investigation I removed the [Block] part, which was of course is the 'User Tools' tile which had the H2 tag the source of the errors, which doesn't fit in the position I placed the widget - the 'menu' as it puts the H2 outside a list item section.

Had to go back and remove the last [/Block] parameter and all is fine. :)
</li>
</ol>

You will notice that there is no p tag in the third list item.????

5 Apr 24, 2008 14:42

Do you have auto-p installed? ;)

¥

6 Apr 24, 2008 14:56

I don't know what it is. Is it a plugin or a setting.

Anyway I have just check my database and the text is fine there too

<ol>
  <li>I removed some options and changed some output text, which put me back as they all came back up on reinstalling. Still had the XHMTL errors</li>
  <li>Realised I had only altered the GUI admin options, not that displayed on the menu bar. Found the 'display' code and removed some of the parameters. This was better the output was fine but I still had 3 errors</li>
  <li>On further investigation I removed the [Block] part, which was of course is the 'User Tools' tile which had the H2 tag the source of the errors, which doesn't fit in the position I placed the widget - the 'menu' as it puts the H2 outside a list item section.

Had to go back and remove the last [/Block] parameter and all is fine. :)
</li>
 
</ol>

So its weird. The correct text is being saved to the database and retreived but when it comes to rendering the third list item i get this p tag.

Are you using Fx. I'd better check it on IE. I've got an old IE6 hidden away :)

7 Apr 24, 2008 14:58

Nah! Its the same on IE so it must be the evil evol playing games with me.

8 Apr 24, 2008 14:58

Auto-p is a renderer plugin which means that it renders the text that's stored in the database when it's first displayed. The results are stored in evo_items__prerendered ( or summat like that )

¥

9 Apr 24, 2008 15:03

At the posting screen, check the list headed Text Renderers ( on the right )
untick auto p and see what happens as all that white space could be inviting an auto p tag

10 Apr 24, 2008 15:23

Yes thank John I had just found that :)

So ¥åßßå your first idea about the css is the issue now, as that wasn't intended. :) The result being exactly as designed by auto rendering a p inside the btext ol li.

Strange how it even renders the text before the two breaks.

Thank again

Bye

EDIT I'll see if I can hack that rederer to keep two breaks as two breaks

11 Apr 24, 2008 15:33

.bText ol p{
font-size:1em;
}

;)

¥

12 Apr 24, 2008 15:51

Thanks ¥åßßå

Got there eventually

.bText ol p{
  line-height: 1.2em;
  padding: 0px 6px 6px 0px;
  font-size: 1em;
}

EDIT Nope its not quite right still. Will sort it better later

13 Apr 24, 2008 16:19

OK ¥åßßå Sorted now

I had to


.bText p {
	line-height: 1.5em;
	padding: 0px 0px 0px 16px;
	text-align: justify;
	font-size: 1.2em;
}

.bText ol {
	line-height: 1.2em;
	margin-left:10px;
	margin-top:-10px;
	padding: 0px 6px 0px 32px;
	text-align: left;
	font-size: 1.2em;
}

.bText ol li p{
  line-height: 1.2em;
	padding: 0 0 6px 0;
	margin:0px;
  font-size: 1em;
}


Form is loading...

b2evo – This forum is powered by b2evolution CMS, a complete engine for your website.