Stringek darabolása, előkészítése css formázáshoz

  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • GeSHi library error: sites/all/modules/geshifilter/geshi is not a directory.
  • The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.
Kategória: 
Snippet
Stringek darabolása, előkészítése css formázáshoz

Ahogy a képen is látszik, az ilyen szövegek formázása nem túl egyszerű. Bármikor jól jöhet, hogyha egy címnél például az első 3 karakternek más-más háttér kell, vagy egyéb hasonlóan cudar manővereket pakolt a grafikába a designer.

Ez a kis sminkfüggvény egy modulba, vagy a template.php-be megkönnyíti a munkát, feldarabolja, classolja a létrehozott spanokat, így már lehet célozni css-ben.

Használata, ha mondjuk egy block címét akarjuk felspanolni, akkor a block.tpl.php-ba cseréljük le:

[geshifilter-code]<h2 class="title"><?php print $title; ?></h2>[/geshifilter-code]

erre:

[geshifilter-code]<h2 class="title"><?php if ($title != '<none>') : print theme_fragmented_string($title, $ide_amilyen_class_nevet_akarsz_a_spanoknak, TRUE); endif; //a végén a TRUE akkor kell, ha sorszámozni szeretnéd a class-okat?></h2>[/geshifilter-code]

És ilyen html-t kapunk:

[geshifilter-code]<h2 class="title"><span class="fragmented fragmented-1 fragmented-1">1</span><span class="fragmented fragmented-2 fragmented-0">0</span><span class="fragmented fragmented-3 fragmented-8">8</span></h2>[/geshifilter-code]

És a sminkfüggvény, csak másold be a template.php-ba:

[geshifilter-drupal6] /* * Theme function to separate string into different <span>'s * * @param $string * The string need to divide * @param $class * The class name in <span class="$class"> * @param $count * If TRUE, in <span class "$class"> will be one more class with counter. * @return * The separeted string. */ function theme_fragmented_string($string, $class = 'fragmented', $count = FALSE) { $output = ''; $string_array = preg_split('//u', $string, -1, PREG_SPLIT_NO_EMPTY); $counter = 1; $classes = $class; foreach ($string_array as $key => $value) { if ($count) { $classes .= ' ' . $classes . '-' . $counter; } $classes .= ' fragmented-' . $value; $output .= '<span class="' . $classes .'">' . $value . '</span>'; $counter++; $classes = $class; } return $output; } [/geshifilter-drupal6]

És végül köszönet Sweetchucknak, aki segített a preg_splitet összehozni.

Ja, és azért értelemszerűen 100+ karakteres szövegre nem biztos, hogy ezt kell használni.

Hozzászólások

Great post. I used to be

Great post. I used to be checking constantly this weblog and I am impressed!

Very useful info particularly the final part :) I handle
such info much. I used to be looking for this particular information for
a long time. Thank you and best of luck.

Good respond in return of

Good respond in return of this issue with firm arguments and explaining the whole thing regarding that.

Willie G youllied I loved as

Willie G youllied

I loved as much as you'll receive carried out right
here. The sketch is attractive, your authored material stylish.
nonetheless, you command get got an shakiness over that you wish be delivering the following.
unwell unquestionably come more formerly again as exactly the same nearly very often inside case you shield this hike.

Greetings, I believe your

Greetings, I believe your site might be having browser
compatibility issues. Whenever I look at your blog in Safari, it looks fine
but when opening in I.E., it's got some overlapping issues.
I merely wanted to provide you with a quick heads up!
Other than that, fantastic website!

Fantastic post but I was

Fantastic post but I was wanting to know if you could write
a litte more on this topic? I'd be very thankful if you could elaborate
a little bit further. Bless you!

It's very simple to find out

It's very simple to find out any matter on net as compared to textbooks, as I found this article
at this web site.

I've been exploring for a bit

I've been exploring for a bit for any high-quality articles or weblog
posts on this sort of house . Exploring in Yahoo I finally stumbled
upon this site. Studying this info So i'm glad to
exhibit that I have an incredibly good uncanny feeling I discovered just what I needed.
I most undoubtedly will make certain to don?t disregard this web site and give it a look regularly.

Greetings, I do believe your

Greetings, I do believe your website could be having web browser compatibility issues.

Whenever I take a look at your website in Safari, it looks fine but when opening in IE, it's got some overlapping issues.
I merely wanted to provide you with a quick heads
up! Other than that, wonderful site!

Hi there every one, here

Hi there every one, here every person is sharing these kinds of knowledge, therefore it's fastidious to read
this website, and I used to pay a visit this web site all the time.

What's up, just wanted to

What's up, just wanted to tell you, I enjoyed this article.
It was helpful. Keep on posting!

Right here is the right

Right here is the right website for anybody who would like to understand this topic.
You realize so much its almost hard to argue with you (not that I personally
will need to…HaHa). You certainly put a fresh spin on a subject that has been discussed
for ages. Excellent stuff, just wonderful!

I was able to find good

I was able to find good advice from your content.

Greetings, I believe your

Greetings, I believe your site could be having browser compatibility issues.
When I take a look at your web site in Safari, it looks fine however when opening in IE, it has some overlapping issues.
I simply wanted to give you a quick heads up!
Other than that, great site!

Hello there! This is my first

Hello there! This is my first visit to your blog! We are a collection of
volunteers and starting a new initiative in a community in the same niche.
Your blog provided us beneficial information to work on. You have done a extraordinary job!

Hi, everything is going sound

Hi, everything is going sound here and ofcourse every one is sharing information, that's truly excellent,
keep up writing.

Hello there, You've done an

Hello there, You've done an excellent job. I'll definitely digg
it and personally suggest to my friends. I am confident they'll be benefited from this web site.

Aw, this was an incredibly

Aw, this was an incredibly good post. Spending some
time and actual effort to generate a good article… but what
can I say… I put things off a lot and never seem to get nearly anything done.

Hey are using Wordpress for

Hey are using Wordpress for your blog platform? I'm new to the blog world
but I'm trying to get started and create my own. Do you require
any html coding expertise to make your own blog?
Any help would be greatly appreciated!

Aw, this was a very good

Aw, this was a very good post. Taking a few minutes and actual effort to create
a superb article… but what can I say… I procrastinate a lot and don't
manage to get nearly anything done.

If you want to increase your

If you want to increase your know-how only keep visiting
this web page and be updated with the latest information posted
here.

Hello, I think your website

Hello, I think your website might be having browser compatibility issues.
When I look at your blog site in Ie, it looks fine but when opening in Internet Explorer,
it has some overlapping. I just wanted to give you a quick heads up!
Other then that, awesome blog!

My brother recommended I may

My brother recommended I may like this website. He was totally right.
This submit truly made my day. You cann't believe just how much time I
had spent for this info! Thank you!

Hello, Neat post. There is a

Hello, Neat post. There is a problem with your website in web
explorer, might check this? IE still is the market
chief and a good section of other folks will pass
over your wonderful writing because of this problem.

Thanks , I've recently been

Thanks , I've recently been searching for info approximately this subject for a while and
yours is the best I have discovered till now. However,
what about the conclusion? Are you sure in regards
to the source?

Do you mind if I quote a few

Do you mind if I quote a few of your articles as long as I provide credit and sources back to your blog?
My website is in the very same niche as yours and my visitors
would genuinely benefit from some of the information you present
here. Please let me know if this ok with you. Cheers!

First off I want to say

First off I want to say terrific blog! I had a quick question in which
I'd like to ask if you don't mind. I was curious to
find out how you center yourself and clear your mind before writing.
I've had trouble clearing my thoughts in getting my thoughts out there.

I do enjoy writing but it just seems like the first 10 to 15 minutes are usually wasted simply just trying to
figure out how to begin. Any ideas or tips? Cheers!

First off I would like to say

First off I would like to say great blog! I had a quick question which I'd
like to ask if you don't mind. I was interested to find out how you center yourself and clear your thoughts before writing.

I have had a difficult time clearing my mind in getting my thoughts out.

I truly do enjoy writing but it just seems like the first 10
to 15 minutes are generally lost just trying to
figure out how to begin. Any suggestions or tips? Appreciate
it!

hey there and thank you for

hey there and thank you for your info – I've definitely picked
up anything new from right here. I did however expertise several technical points using this website, since I experienced to reload the web site
lots of times previous to I could get it to load properly.
I had been wondering if your hosting is OK? Not that I'm complaining, but sluggish loading instances times will sometimes affect your placement in google and can damage your quality score if
advertising and marketing with Adwords. Well I am adding this
RSS to my email and could look out for a lot more of your respective intriguing content.

Make sure you update this again soon.

Every weekend i used to pay a

Every weekend i used to pay a visit this site, for the reason that i want enjoyment, as this this web site conations truly nice
funny information too.

These are truly enormous

These are truly enormous ideas in on the topic of blogging.

You have touched some good factors here. Any way
keep up wrinting.

Greetings from Los angeles!

Greetings from Los angeles! I'm bored at work so
I decided to browse your blog on my iphone during lunch break.

I enjoy the information you provide here and can't wait to take a look when I get home.
I'm shocked at how fast your blog loaded on my phone .. I'm not even using WIFI,
just 3G .. Anyhow, wonderful site!

Very good post. I am

Very good post. I am experiencing a few of these issues as well..

I was recommended this web

I was recommended this web site by my cousin. I'm not sure whether
this post is written by him as nobody else know such detailed about my difficulty.
You are wonderful! Thanks!

It's really a cool and useful

It's really a cool and useful piece of info. I
am satisfied that you simply shared this
useful info with us. Please keep us up to date like this.
Thank you for sharing.

Outstanding post however I

Outstanding post however I was wondering if you could write a litte more
on this topic? I'd be very thankful if you could elaborate a little bit further.
Thank you!

Great blog here! Also your

Great blog here! Also your site loads up very fast!
What host are you using? Can I get your affiliate link to your host?

I wish my web site loaded up as quickly as yours lol

Its like you read my mind!

Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something.
I think that you could do with a few pics to drive the message home a little bit,
but other than that, this is wonderful blog. A fantastic read.
I will certainly be back.

Wow, that's what I was

Wow, that's what I was exploring for, what a information! present here at this
weblog, thanks admin of this website.

If some one wants expert view

If some one wants expert view concerning blogging after that i recommend him/her to
pay a visit this blog, Keep up the pleasant work.

I do not even know the way I

I do not even know the way I ended up here, but I thought this
submit was once good. I don't understand who you might be but definitely you are
going to a well-known blogger if you aren't already.
Cheers!

My spouse and I stumbled over

My spouse and I stumbled over here different website
and thought I should check things out. I like
what I see so i am just following you. Look forward to going over your web page for a second time.

This text is priceless. Where

This text is priceless. Where can I find out more?

It's going to be finish of

It's going to be finish of mine day, except before end I am reading this
wonderful piece of writing to increase my know-how.

Saved as a favorite, I really

Saved as a favorite, I really like your site!

Incredible! This blog looks

Incredible! This blog looks exactly like
my old one! It's on a entirely different topic but it has pretty much the same
page layout and design. Wonderful choice of colors!

Right here is the right

Right here is the right website for anybody who really wants to understand this topic.
You realize a whole lot its almost hard to argue with you (not that I really
will need to…HaHa). You certainly put a brand new spin on a subject that has been discussed for years.

Excellent stuff, just wonderful!

Hurrah! Finally I got a

Hurrah! Finally I got a webpage from where I be able to really obtain valuable data regarding
my study and knowledge.

I got this site from my pal

I got this site from my pal who told me about this site and now this time I am visiting this website and reading very
informative articles or reviews at this time.

It's really a nice and useful

It's really a nice and useful piece of info. I am happy that you shared this
helpful information with us. Please stay us up to date like this.
Thanks for sharing.

Hi colleagues, its wonderful

Hi colleagues, its wonderful article on the topic of educationand entirely defined, keep
it up all the time.

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.