In TP 0.9.8 you can center the block titles by using tags as below,
<center>My example block</center>
This doesn't work in TP 1.0b5.1 Is this by design, or a bug? And is there a work around for this?
You could always add some CSS to center your block titles. text-align: center; is what you'd use.
Thanks IchBin
Me being thick again, where would I add the css?
How you do this depends on what version of SMF you are using. In SMF 2.0 RC3, TP 1.0 beta 5-1 gives you a choice of 10 different styles for each block although they all use either the titlebg or the catbg and it's theme specific. Some custom themes don't have all 10 of the styles available. In RC3, the file to look at would be /Themes/default/css/index.css though it would be different for a custom theme. In SMF 1.1.11, your only choice would be the titlebg (I think) and the file to edit would be the style.css in the theme. The reason I'm not sure is because I've never used beta 5-1 yet on an SMF 1.1.11 Forum.
If you have FireFox, an add-on called Firebug would help you a lot to figure out what to change.
ZarPrime
Thanks ZarPrime.
This seems like a backward step to me. This was so easy to do in 0.9.8 by entering the title wrapped in center tags directly in the blocks admin panel.
It's all part of cleaning the input. Bloc has taken extra steps (so has SMF) in cleaning all the data that goes into the database. It's just a side affect of making TP more secure IMO. It's not backwards as it has also moved all the design and layout to the templates/css. The same step that SMF has taken to make it easier to theme things. You can also change all the properties of the fonts at the same time. All in a single place, instead of having to do it for every block.
Simple add text-align:center; to the tp-style.css file where the .tp_half h3.catbg class is.
It may seem like a backward step but, as Ichbin says, streamlining the code and making it more efficient and secure were the priorities.
Another example that I was a little upset about at first was that the colors for Calendar Birthdays, Events, and Holidays was removed from the SMF Calendar settings and placed into the css file. At first, I didn't like this, but after I figured out that it would be easier for theme authors to be able to change these settings when designing their theme, to fit the theme, it made sense to me.
I can almost guarantee that Bloc would never consider changing TP to allow html in the titles of blocks (that's a security risk), but if you made a feature request for a future version of TP to allow bbc code to be possible for block titles, this might just be something that he would consider. ;)
ZarPrime
its also a security thing. If anyon e was abler to inject or change html code in the DB fields for say a forum area header or a block header then they could divert that page or block to where ever they want.
Unfurtunatly in todays works if you can do something for good reasons. others can abuse it.
I too miss this and other things similar and yes its a pain having to find other ways to achieve what we used to take for granted. but thats life :(
Quote from: BlueSteel on April 23, 2010, 04:07:02 AM
its also a security thing. If anyon e was abler to inject or change html code in the DB fields for say a forum area header or a block header then they could divert that page or block to where ever they want.
Unfurtunatly in todays works if you can do something for good reasons. others can abuse it.
I too miss this and other things similar and yes its a pain having to find other ways to achieve what we used to take for granted. but thats life :(
BlueSteel, thanks. I did wonder if it was for security to be honest, hence my asking if it was by design. I don't mind living with it for sake of security to be honest. ;)
ZarPrime, glad to see you've requested this as a feature in bugtracker. ;)
http://www.tinyportal.net/index.php?action=bugtracker;sa=bug576
Yep, I think it's a good idea. O0 I don't know how Bloc will feel about it though. ;)
ZarPrime
Was this ever resolved in the next update? The Bugtracker has not migrated so we can't see what was planned for the next release. ;)
Resolved? Did Bloc say he would add this? I don't recall.
No, he didn't mention it. It was a feature request in the BugTracker back on TP.net. I'm sure Bloc still has the list of open bugs/feature requests but I have no idea of whether he has done anything with this.
ZP
Thanks guys, I'll wait and see then. ;)
It would be nice especially for center blocks, or should I say anything in the center of the front page. The titles look a bit naff pushed to the left hand side of those.