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.
  • 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

A financial advisor is your

A financial advisor is your planning partner.

I've been browsing online

I've been browsing online more than 4 hours
today, yet I never found any interesting article like yours.

It's pretty worth enough for me. In my opinion, if all website
owners and bloggers made good content as you did,
the internet will be a lot more useful than ever before.

Hey there great website! Does

Hey there great website! Does running a blog similar to this take a large amount of
work? I have absolutely no expertise in coding but I had been hoping to start my
own blog soon. Anyway, if you have any recommendations or techniques
for new blog owners please share. I understand this is off subject but I just wanted to ask.
Appreciate it!

c641gjr

Magnificent beat ! I would

Magnificent beat ! I would like to apprentice while you
amend your site, how can i subscribe for a blog website?
The account helped me a applicable deal. I were a little bit familiar of this your
broadcast offered vivid clear concept

Investors do pay direct and

Investors do pay direct and oblique prices.

ljuvknh6 fotbollströjor barn

ljuvknh6 fotbollströjor barn i7hkwg f9628ki0 maglie calcio zs1qc5n0 53rpgt6xo fotballdrakter barn szdxgv egpjoqx3hs billige fodboldtrøjer 7xpzti32

Good day! I could have sworn

Good day! I could have sworn I've visited your blog before but
after going through many of the posts I realized it's new to
me. Anyhow, I'm certainly pleased I came across it and I'll
be bookmarking it and checking back often!

Great internet site! It looks

Great internet site! It looks really professional! Keep up the helpful work!

Howdy are using Wordpress for

Howdy 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 coding
knowledge to make your own blog? Any help would be really appreciated!

Hi there! I just wish to

Hi there! I just wish to offer you a big
thumbs up for your excellent information you've got right here
on this post. I will be returning to your website
for more soon.
OutOfSight Hayward Junk Removal Pros
1366 Homestead Ln, Hayward, CA 94545
510-621-6379
joeyedmonds38572 [at] gmail [dot] com

My family members all the

My family members all the time say that I am wasting my time here at net, but I know I am getting know-how daily by reading thes pleasant posts.

Hi there, i read your blog

Hi there, i read your blog from time to time and i own a similar one
and i was just wondering if you get a lot of spam remarks?

If so how do you stop it, any plugin or anything you can suggest?
I get so much lately it's driving me crazy so any assistance
is very much appreciated.
OutOfSight Hayward Junk Removal Pros
1366 Homestead Ln, Hayward, CA 94545
510-621-6379
joeyedmonds38572 [at] gmail [dot] com

Hi, yup this post is really

Hi, yup this post is really nice and I have learned lot of things from it regarding blogging.
thanks.

I loved as much as you will

I loved as much as you will receive carried out right here.

The sketch is attractive, your authored material stylish.
nonetheless, you command get got an nervousness over that you wish be delivering the following.

unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you
shield this increase.
OutOfSight Hayward Junk Removal Pros
1366 Homestead Ln, Hayward, CA 94545
510-621-6379
joeyedmonds38572 [at] gmail [dot] com

Magnificent goods from you,

Magnificent goods from you, man. I have understand your stuff previous to and you're just extremely wonderful.
I actually like what you've acquired here, certainly like what you're stating
and the way in which you say it. You make it entertaining
and you still care for to keep it sensible. I can not wait to read far more from you.

This is actually a terrific web site.
OutOfSight Hayward Junk Removal Pros
1366 Homestead Ln, Hayward, CA 94545
510-621-6379
joeyedmonds38572 [at] gmail [dot] com

I know this web site offers

I know this web site offers quality dependent articles or reviews and additional information, is there any other site which presents such stuff in quality?

Does your website have a

Does your website have a contact page? I'm having trouble
locating it but, I'd like to send you an email.
I've got some ideas for your blog you might be interested in hearing.
Either way, great website and I look forward to seeing it improve over time.

Hey! This is kind of off

Hey! This is kind of off topic but I need some guidance from
an established blog. Is it very difficult to set up your
own blog? I'm not very techincal but I can figure things out pretty quick.
I'm thinking about making my own but I'm not sure where to begin.
Do you have any tips or suggestions? With thanks

Hmm it seems like your

Hmm it seems like your website ate my first comment (it was super
long) so I guess I'll just sum it up what I wrote and say, I'm
thoroughly enjoying your blog. I too am an aspiring blog blogger
but I'm still new to everything. Do you have any points for novice blog writers?
I'd genuinely appreciate it.
Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

I've been surfing online more

I've been surfing online more than three hours lately,
yet I never discovered any attention-grabbing article like yours.
It's lovely price sufficient for me. In my opinion, if all website owners and bloggers made just
right content material as you did, the net shall be much more useful than ever
before.
Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

Hey there! This is kind of

Hey there! This is kind of off topic but I need some advice from an established blog.

Is it difficult to set up your own blog? I'm not very techincal but I can figure things out pretty quick.

I'm thinking about creating my own but I'm not sure where to start.

Do you have any points or suggestions? Thank you
Jim's San Jose Carpet Cleaning
780 S 3rd St, San Jose, CA 95112
3408-351-1063
colettemackie2641 [at] gmail [dot] com

Great internet site! It looks

Great internet site! It looks really expert! Sustain the good job!

Very soon this web site will

Very soon this web site will be famous among all blog
viewers, due to it's nice content

You really make it seem so

You really make it seem so easy with your presentation but
I find this topic to be actually something which I think
I would never understand. It seems too complicated and very broad for me.
I am looking forward for your next post, I will try to get the hang
of it!

Very good Webpage, Maintain

Very good Webpage, Maintain the good job. Thanks for your time.|

Hi, I read your blogs daily.

Hi, I read your blogs daily. Your writing style is witty, keep up
the good work!

fotbollströjor fodboldtrøjer

Hi there everyone, it's my

Hi there everyone, it's my first visit at this website,
and paragraph is genuinely fruitful for me,
keep up posting these posts.
OutOfSight Hayward Junk Removal Pros
1366 Homestead Ln, Hayward, CA 94545
510-621-6379
joeyedmonds38572 [at] gmail [dot] com

Wow, wonderful blog format!

Wow, wonderful blog format! How long have you been running a blog
for? you make running a blog look easy. The overall glance of your site is great, let alone the content!

I'm no longer positive the

I'm no longer positive the place you're getting
your info, however great topic. I must spend a while studying more or working out more.

Thanks for fantastic information I used to be in search
of this info for my mission.

Hi, I do think this is a

Hi, I do think this is a great blog. I stumbledupon it ;) I
am going to come back once again since I book marked
it. Money and freedom is the greatest way to change, may you be rich and continue to guide other people.

websitetestlink.

Hey! I know this is kinda off

Hey! I know this is kinda off topic however ,
I'd figured I'd ask. Would you be interested in exchanging
links or maybe guest authoring a blog post or vice-versa?
My website covers a lot of the same subjects as yours
and I think we could greatly benefit from each other.
If you might be interested feel free to send me an e-mail.
I look forward to hearing from you! Wonderful blog by the way!

cresector. tellanews.

Many thanks really useful.

Many thanks really useful. Will certainly share site with my pals.

I go to see day-to-day some

I go to see day-to-day some websites and blogs to read content,
except this webpage offers feature based content.

OutOfSight Hayward Junk Removal Pros
1366 Homestead Ln, Hayward, CA 94545
510-621-6379
joeyedmonds38572 [at] gmail [dot] com

A financial advisor is your

A financial advisor is your planning partner.

I all the time used to study

I all the time used to study post in news papers but now as I
am a user of net so from now I am using net for articles or reviews,
thanks to web.

Hi there it's me, I am also

Hi there it's me, I am also visiting this site on a regular basis, this site
is really pleasant and the people are actually sharing fastidious thoughts.

Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

Take into account investments

Take into account investments that offer instant annuities.

umsolution. ysiaq.

I really like looking through

I really like looking through an article that will make people think.
Also, thank you for allowing for me to comment!

Schwab Clever Portfolios

Schwab Clever Portfolios invests in Schwab ETFs.

Hello! I know this is kinda

Hello! I know this is kinda off topic however I'd figured I'd ask.
Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa?

My site addresses a lot of the same subjects as yours and I
believe we could greatly benefit from each other.
If you might be interested feel free to shoot me an e-mail.

I look forward to hearing from you! Fantastic blog by the way!

deryun. amoremjewelry.

Hey there! I know this is

Hey there! I know this is somewhat off-topic
however I needed to ask. Does operating a well-established blog such as yours take
a massive amount work? I am completely new to writing a blog however I
do write in my journal every day. I'd like to start a blog so I can easily share
my personal experience and views online. Please let me know if you have any kind of suggestions or tips
for brand new aspiring blog owners. Appreciate it!

Financial advisors business

Financial advisors business is folks business.

Many thanks for sharing your

Many thanks for sharing your well put together web site.

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.