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

hi!,I love your writing so a

hi!,I love your writing so a lot! proportion we keep up a correspondence extra about your article on AOL?
I need a specialist on this space to solve my problem.
Maybe that's you! Looking ahead to see you.

Hi it's me, I am also

Hi it's me, I am also visiting this site regularly, this site is in fact pleasant and the
users are actually sharing pleasant thoughts. https://anunturi-parbrize.ro/parbriz-honda-24.html

What's up friends, its

What's up friends, its enormous piece of writing about
teachingand fully explained, keep it up all the time. https://anunturi-parbrize.ro/luneta-volkswagen-72.html

Thanks for writing this

Thanks for writing this awesome article. I'm a long time reader but I've never been compelled to leave a comment.
I subscribed to your blog and shared this on my Twitter.
Thanks again for a great post! https://inveska.ca/differences-entre-courtier-et-agent-dassurance/

WOW just what I was looking

WOW just what I was looking for. Came here by searching
for website

I really like it when people

I really like it when people come together and share thoughts.

Great website, stick with it! https://www.nudermacosmetique.com/votre-cellulite-vous-incommode/

I like what you guys tend to

I like what you guys tend to be up too. Such clever
work and exposure! Keep up the excellent works guys I've added you guys to our blogroll.

Everyone loves what you guys

Everyone loves what you guys are up too. This sort of clever
work and coverage! Keep up the terrific works guys I've
you guys to my own blogroll. https://anunturi-parbrize.ro/luneta-hummer-25.html

I would state. That is the

I would state. That is the first time I frequented your web page and so far?
I amazed with the research you made to make this particular post https://leroiduplancher.com/blog/

Wonderful article! That is

Wonderful article! That is the kind of information that are meant to be shared across the web.
Shame on Google for not positioning this post upper! Come on over and visit my website
. Thank you =) https://anunturi-parbrize.ro/index.php?cauta=geam+scania

It is really a nice and

It is really a nice and useful piece of information. I am happy that you shared this helpful
information with us. Please keep us up to date like this.
Thank you for sharing. https://anunturi-parbrize.ro/geam-toyota-70.html

After I originally commented

After I originally commented I appear to have clicked on the -Notify me
when new comments are added- checkbox and now whenever a comment is added I recieve 4 emails
with the same comment. Is there a means you are able to remove me from that
service? Thanks!

Do you have a spam problem on

Do you have a spam problem on this blog; I also am a
blogger, and I was wondering your situation; many of us
have developed some nice methods and we are looking to exchange strategies with others, why
not shoot me an e-mail if interested. https://anunturi-parbrize.ro/index.php?cauta=luneta+dacia

Nice replies in return of

Nice replies in return of this question with solid arguments and explaining the whole
thing regarding that.

Oh my goodness! Awesome

Oh my goodness! Awesome article dude! Thanks, However I am experiencing problems with your RSS.

I don't understand the reason why I can't subscribe to it.
Is there anyone else getting identical RSS problems?
Anybody who knows the solution can you kindly respond?
Thanx!!

Fantastic items from you,

Fantastic items from you, man. I have keep in mind your stuff previous to and you are simply extremely excellent.
I actually like what you've received right
here, certainly like what you are saying and the way in which
during which you assert it. You make it enjoyable and you continue to care
for to stay it sensible. I can't wait to read far more from you.
This is really a tremendous web site. https://anunturi-parbrize.ro/index.php?cauta=geam+volkswagen

Quality articles or reviews

Quality articles or reviews is the key to attract the visitors
to pay a quick visit the web site, that's what this web page is providing.

Wow, this article is

Wow, this article is pleasant, my sister is analyzing these kinds of
things, thus I am going to
inform her. https://www.auroral.ca/comment-interpreter-les-etiquettes-apposees-sur-l...

Hello my friend! I wish to

Hello my friend! I wish to say that this post is amazing, great
written and come with approximately all vital infos.
I would like to see more posts like this . https://anunturi-parbrize.ro/index.php?cauta=parbriz+iveco

Hi there to all, how is all,

Hi there to all, how is all, I think every one is getting more from
this site, and your views are good for new visitors.

I used to be suggested this

I used to be suggested this blog by my cousin. I'm no longer sure whether this post is written via him as nobody else recognize such
unique about my difficulty. You are incredible! Thank you! https://anunturi-parbrize.ro/luneta-ford-23.html

This is my first time visit

This is my first time visit at here and i am in fact pleassant to read all at alone place. https://anunturi-parbrize.ro/index.php?cauta=parbriz+volkswagen

Thanks for publishing this

Thanks for publishing this awesome article. I'm a long time reader
but I've never been compelled to leave a comment.
I subscribed to your blog and shared this on my Facebook.

Thanks again for a great post! https://www.tailoredsuitparis.fr/

I was curious if you ever

I was curious if you ever considered changing the structure of your
blog? Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content so people could connect with
it better. Youve got an awful lot of text for only having one or 2 pictures.
Maybe you could space it out better?

Thanks for sharing your

Thanks for sharing your thoughts. I really appreciate
your efforts and I will be waiting for your further write ups
thank you once again. https://anunturi-parbrize.ro/index.php?cauta=geam+bmw

Thanks for ones marvelous

Thanks for ones marvelous posting! I seriously enjoyed reading it,
you are a great author.I will be sure to bookmark your blog and will come back
in the foreseeable future. I want to encourage continue your great posts, have a nice holiday weekend! https://anunturi-parbrize.ro/parbriz-fiat-22.html

An impressive share! I have

An impressive share! I have just forwarded this onto a friend
who has been doing a little research on this. And he in fact ordered me lunch due to the fact that I discovered it for him...
lol. So let me reword this.... Thank YOU for the meal!!
But yeah, thanks for spending some time to discuss this
issue here on your website. https://anunturi-parbrize.ro/index.php?cauta=geam+citroen

You should take part in a

You should take part in a contest for one of the most useful sites on the
web. I am going to recommend this web site!

Thanks in favor of sharing

Thanks in favor of sharing such a fastidious idea, piece of writing is good, thats why i have read it fully https://anunturi-parbrize.ro/index.php?cauta=geam+lincoln

Very great post. I just

Very great post. I just stumbled upon your blog and wished to
mention that I have truly loved surfing around your blog posts.
In any case I will be subscribing in your feed and I'm hoping you write again very soon!

What's up to all, the

What's up to all, the contents present at this site are genuinely remarkable for people experience, well, keep up the good work fellows.

I was able to find good info

I was able to find good info from your articles.

I am really thankful to the

I am really thankful to the holder of this web site who has shared
this fantastic piece of writing at here.

I do not even know how I

I do not even know how I ended up right here, however I believed this post used
to be good. I don't realize who you're but definitely you're going to a famous
blogger if you are not already. Cheers! https://anunturi-parbrize.ro/parbriz-kia-34.html

If some one desires expert

If some one desires expert view on the topic of blogging and site-building then i
advise him/her to visit this weblog, Keep up the good work.바카라사이트

Fine way of telling, and good

Fine way of telling, and good paragraph to get information regarding
my presentation focus, which i am going to present in institution of higher education.

Hi there to every one, it's

Hi there to every one, it's really a good for me to pay a visit this
site, it consists of priceless Information. https://anunturi-parbrize.ro/index.php?cauta=geam+volvo

Pretty nice post. I just

Pretty nice post. I just stumbled upon your weblog and wanted to mention that I have truly
loved surfing around your blog posts. After all I'll be subscribing for
your feed and I'm hoping you write once more very soon!

We stumbled over here from a

We stumbled over here from a different web page and thought I might
as well check things out. I like what I see
so i am just following you. Look forward to looking into your web page for
a second time.

I love your blog.. very nice

I love your blog.. very nice colors & theme.
Did you design this website yourself or did you hire someone
to do it for you? Plz respond as I'm looking to design my own blog and would like to find out where u got this from.

thanks a lot

I know this web page offers

I know this web page offers quality dependent posts and other data, is there any other website which gives these
data in quality?

It's an amazing post for all

It's an amazing post for all the web visitors; they will obtain advantage from it I am sure.

Simply wish to say your

Simply wish to say your article is as amazing.
The clearness for your submit is simply excellent and i can suppose you're an expert on this
subject. Fine together with your permission allow me to grab
your RSS feed to keep updated with impending post.
Thank you 1,000,000 and please continue the gratifying
work.

Thank you for writing this

Thank you for writing this awesome article. I'm a long time
reader but I've never been compelled to leave a comment.
I subscribed to your blog and shared this
on my Twitter. Thanks again for a great article! https://amassante.com/comment-soulager-une-entorse-lombaire/

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

Thank you for the auspicious writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you! However, how can we
communicate?

It's hard to come by educated

It's hard to come by educated people in this particular subject, however,
you sound like you know what you're talking about!
Thanks

Thanks for ones marvelous

Thanks for ones marvelous posting! I really enjoyed reading it, you will be a great author.
I will be sure to bookmark your blog and definitely will come back sometime soon. I want
to encourage continue your great job, have a nice holiday weekend!

I'm really enjoying the

I'm really enjoying the design and layout of your site.
It's a very easy on the eyes which makes it much more enjoyable for me to come here and visit
more often. Did you hire out a developer to create your theme?
Fantastic work!

Hi, I do think this is an

Hi, I do think this is an excellent web site. I stumbledupon it ;) I
will come back once again since i have book marked it.
Money and freedom is the best way to change,
may you be rich and continue to help other people.

It's a shame you don't have a

It's a shame you don't have a donate button! I'd definitely donate to
this fantastic blog! I suppose for now i'll settle for bookmarking and adding your RSS
feed to my Google account. I look forward to fresh updates and will share this
blog with my Facebook group. Talk soon!

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.