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

Pеculiar article, ust what I

Pеculiar article, ust what I needed. https://independent-escortservice.de/author/cindipenrod/

Hello i am kavin, its my

Hello i am kavin, its my first occasion to commenting anywhere, when i read this post i
thought i could also create comment due to this sensible paragraph.

Very nice post. I just

Very nice post. I just stumbled upon your blog and wanted
to say that I have truly enjoyed surfing around your
blog posts. In any case I'll be subscribing to your feed
and I hope you write again soon!

Thіs design is wicked! You

Thіs design is wicked! You obviously know how to kkeep a reader amᥙsed.
Between your wit and your videos, I was almost moved too stаrt my own bl᧐g (well, almost...HaHa!) Fɑntastiuc job.
I really enjⲟyed what yoᥙ had to say, and more than that,
how you presented it. Too cool! https://x4wiki.grayghostindustries.com/index.php?title=User:Kellee26W533092

This is really

This is really attention-grabbing, You're an excessively professional blogger.

I've joined your feed and stay up for searching for more of your wonderful post.
Additionally, I have shared your web site in my social networks

I alpways used to read

I alpways used to read paragraph in news papers but now as І am a useг
of internet thus from now Ӏ am usіng net foг articles or reviews, tһanks to web.

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

Hi everyone, it's my first pay a quick visit at this site,
and post is truly fruitful for me, keep up posting these articles.

Please let me know if you're

Please let me know if you're looking for a article writer for your weblog.
You have some really great articles and I believe I would be a good asset.
If you ever want to take some of the load off, I'd really like to write some material for your blog
in exchange for a link back to mine. Please blast me an e-mail
if interested. Cheers!

Hi there! This is my first

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

Today, while I was at work,

Today, while I was at work, my sister stole my iPad and tested
to see if it can survive a twenty five foot drop, just so she can be a youtube sensation. My
iPad is now destroyed and she has 83 views.
I know this is entirely off topic but I had to share it
with someone!

Hey would you mind sharing

Hey would you mind sharing which blog platform you're working with?
I'm planning to start my own blog in the near future but
I'm having a difficult time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design seems different
then most blogs and I'm looking for something completely unique.

P.S Sorry for being off-topic but I had to ask!

Its like you read my mind!

Its like you read my mind! You seem to know
so much 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
bit, but other than that, this is fantastic blog.
A great read. I'll certainly be back.

Hello! I'm at work surfing

Hello! I'm at work surfing around your blog from my new iphone 3gs!
Just wanted to say I love reading your blog and look forward to all your posts!
Keep up the great work!

What i don't realize is

What i don't realize is actually how you are not really a lot more neatly-liked than you might be
right now. You're very intelligent. You recognize thus
considerably in terms of this matter, made me personally imagine
it from a lot of various angles. Its like men and women are not involved except it's
something to accomplish with Girl gaga! Your own stuffs nice.
All the time handle it up!

Hi! This is my first comment

Hi! This is my first comment here so I just wanted to give a quick shout
out and tell you I genuinely enjoy reading through your blog posts.
Can you suggest any other blogs/websites/forums that
go over the same subjects? Many thanks!

It is not my first time to

It is not my first time to visit this site, i am visiting
this site dailly and take nice data from here everyday.

Every weekend i used to pay a

Every weekend i used to pay a quick visit this website, because i want enjoyment, for the reason that
this this web page conations really nice funny data too.

Exceptional post however I

Exceptional post however 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.
Cheers! https://anunturi-parbrize.ro/index.php?page=16675

I enjoy what you guys are

I enjoy what you guys are usually up too. https://www.crealunch.com

I take pleasure in, lead to I

I take pleasure in, lead to I discovered exactly what
I was looking for. You've ended my 4 day lengthy hunt!

God Bless you man. Have a great day. Bye https://anunturi-parbrize.ro/geam-aston_martin-3.html

Αw, tһis was an incredibly

Αw, tһis was an incredibly nice pߋst.
Taking the time and ɑctual effort to produce a supeгb article… bbut
what can I say… I put things off a whole lot and don'tmanage to get nearly anything done. http://shaboxes.com/author/aundreamcnu/

Thankfulness to my father who

Thankfulness to my father who told me concerning this blog, this weblog is genuinely remarkable.

Hi, after reading this

Hi, after reading this amazing piece of writing i
am also happy to share my familiarity here with colleagues.

Way cool! Some extremely

Way cool! Some extremely valid points! I appreciate you writing this post and the rest of
the website is also really good.

Hello, i think that i saw you

Hello, i think that i saw you visited my web site so i came to “return the favor”.I
am attempting to find things to enhance my web site!I suppose its ok to use a few of your ideas!! https://anunturi-parbrize.ro/geam-mazda-44.html

This excellent website

This excellent website certainly has all of the info I
wanted about this subject and didn't know who to ask.

Hey! I know this is somewhat

Hey! I know this is somewhat off topic but I was wondering if you
knew where I could get a captcha plugin for my comment form?
I'm using the same blog platform as yours
and I'm having problems finding one? Thanks a lot! https://anunturi-parbrize.ro/luneta-smart-65.html

It's perfect time to make

It's perfect time to make some plans for the future and it's time to be happy.
I've read this post and if I could I want to suggest
you some interesting things or suggestions. Maybe you can write next articles referring to this article.
I want to read even more things about it!

Simply desire to say your

Simply desire to say your article is as astounding. The clearness in your publish is just spectacular and i can assume you are an expert in this subject.
Well along with your permission let me to clutch your RSS feed to keep updated with approaching
post. Thank you a million and please keep up the rewarding work.

You neeɗ to be a part of a

You neeɗ to be a part of a cntest for one of the
best blogs ᧐n the web. I will һighly recommend this ᴡeƅsite! http://shop.gmynsh.com/comment/html/?794308.html

This design is spectacular!

This design is spectacular! You obviously know how to keep a reader amused.

Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Great
job. I really enjoyed what you had to say, and more than that, how you
presented it. Too cool!

M.E.C Mon Electricien

M.E.C Mon Electricien Catalan
44 Rue Henry de Turenne
66100 Perpignan
0651212596

Electricien Perpignan

I don't know whether it's just me or if perhaps everyone else experiencing issues with your blog.
It appears like some of the written text in your posts are running off the screen. Can somebody else
please provide feedback and let me know if this is happening
to them as well? This may be a issue with my browser because I've had this
happen previously. Thanks

Pretty element of content. I

Pretty element of content. I simply stumbled
upon your site and in accession capital to say that I get actually enjoyed account
your blog posts. Any way I will be subscribing in your augment or even I success you get entry to persistently rapidly.

Hi tһere tto every bοdy, it's

Hi tһere tto every bοdy, it's mmy first pay
a visit off this website; this webpage cߋntains awesome and really
excelleent information in support off viѕitors. https://Huisdierengids.nl/author/lorene90420/

Very nice post. I just

Very nice post. I just stumbled upon your weblog and wanted to
say that I've really enjoyed browsing your blog posts.

In any case I will be subscribing to your feed and I hope you
write again very soon!

I just couldn't leave your

I just couldn't leave your website before suggesting that
I actually enjoyed the standard information an individual supply for
your visitors? Is going to be again frequently to
investigate cross-check new posts

Way cool! Some very valid

Way cool! Some very valid points! I appreciate you penning
this article and also the rest of the site is really good. https://parbrize-online.ro/geamuri/geamuri.php

Touche. Sound arguments. Keep

Touche. Sound arguments. Keep up the great spirit. https://anunturi-parbrize.ro/parbriz-scania-61.html

Willie G youllied It's

Willie G youllied

It's appropriate time to make some plans for
the future and it is time to be happy. I've read this post
and if I could I desire to suggest you some interesting things or advice.
Maybe you can write next articles referring to this article.

I wish to read even more things about it!

I'm extremely impressed with

I'm extremely impressed with your writing skills and also with the layout on your weblog.

Is this a paid theme or did you modify it yourself? Anyway keep
up the nice quality writing, it is rare to see a nice
blog like this one these days.

Нell᧐ Dear, are you really

Нell᧐ Dear, are you really visitingg this web page daily, if so after that yoս will absolutely get nce knowledge. https://git.mosaic.njaes.rutgers.edu/bailirgzi3

Ρiece of writing ᴡriting is

Ρiece of writing ᴡriting is also a excitement, if you bbe
familiar witһ then you can write iff not it is diffіⅽult to wгite. http://dominoqqapkterbaru157.yousher.com/situs-khusus-judi-slot-online-t...

Hello my loved one! I wish to

Hello my loved one! I wish to say that this post is amazing,
nice written and come with approximately all vital infos. I would like to look extra posts like this .

When I initially commented I

When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment
is added I get several e-mails with the same comment.

Is there any way you can remove people from that service?
Thanks a lot!

I tһink that is among the so

I tһink that is among the so much vital іnformation for me.

And i'm happy reading youг articⅼе. But want to statement oon slme basic things, The
site tаate is great, the articles iѕ in point of fact
great : D. Excellent process, cheers http://browholic.com/product_Inquiry/1775533

My family members every time

My family members every time say that I am wasting my time here at net, however I know I am getting know-how all the time by reading such good content.

Hi, yup this piece of writing

Hi, yup this piece of writing is in fact pleasant and I have learned lot
of things from it about blogging. thanks.

Hey just wanted to give you a

Hey just wanted to give you a quick heads up and let you know a few of the images aren't loading properly.

I'm not sure why but I think its a linking issue.

I've tried it in two different browsers and both show the same outcome.

What's up to all, how is

What's up to all, how is everything, I think every one is getting more
from this web site, and your views are pleasant in support of new viewers.

Appreciation to my father who

Appreciation to my father who informed me concerning this web site,
this webpage is really amazing.

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.