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

Hello there, You have done

Hello there, You have done an incredible job. I'll certainly digg it and personally suggest to my friends.
I'm sure they'll be benefited from this website.

You're so interesting! I

You're so interesting! I don't believe I have read a single thing like
this before. So good to find somebody with a few genuine thoughts on this subject matter.
Seriously.. thank you for starting this up. This site is one
thing that is required on the internet, someone with a
bit of originality!

Hi there! Someone in my

Hi there! Someone in my Facebook group shared this site with us so I came to check it out.

I'm definitely enjoying the information. I'm book-marking and
will be tweeting this to my followers! Excellent blog and
superb style and design.

Have you ever thought about

Have you ever thought about adding a little bit more
than just your articles? I mean, what you say is important and all.
But think about if you added some great photos or videos to give your posts more, "pop"!
Your content is excellent but with pics and clips, this
website could undeniably be one of the very best in its field.
Good blog!

For hottest information you

For hottest information you have to visit web and on internet I found
this web site as a best site for most up-to-date updates.

Hi! This is my first visit to

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

Taxi moto line 128 Rue la

Taxi moto line
128 Rue la Boétie
75008 Paris
+33 6 51 612 712  

Taxi moto paris

Hey very nice blog!! Guy .. Excellent .. Superb ..
I will bookmark your site and take the feeds additionally?
I am glad to seek out numerous helpful information here in the publish, we need work
out extra strategies in this regard, thank you for sharing.
. . . . .

Hello to all, it's in fact a

Hello to all, it's in fact a pleasant for me
to go to see this web site, it includes useful Information.

Ahaa, its good discussion on

Ahaa, its good discussion on the topic of this article here
at this website, I have read all that, so now me also commenting here.

Have you ever thought about

Have you ever thought about publishing an e-book or guest
authoring on other blogs? I have a blog based on the same topics
you discuss and would really like to have you share
some stories/information. I know my viewers would value your work.
If you're even remotely interested, feel free to send me an e-mail.

I appreciate, result in I

I appreciate, result in I discovered exactly what I used
to be looking for. You have ended my 4 day long hunt!
God Bless you man. Have a great day. Bye

Superb, what a web site it

Superb, what a web site it is! This web site gives helpful data to
us, keep it up.

Hi there! This is my first

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

I all the time emailed this

I all the time emailed this webpage post page to all my contacts, since if like to read it then my friends
will too.

That is really interesting,

That is really interesting, You are a very professional blogger.
I've joined your rss feed and sit up for seeking more of your wonderful post.

Additionally, I have shared your site in my social networks

I constantly spent my half an

I constantly spent my half an hour to read this website's articles daily along with
a cup of coffee.

When some one searches for

When some one searches for his required thing, therefore he/she needs to be available that in detail, thus that
thing is maintained over here.

Have you ever considered

Have you ever considered writing an ebook or guest
authoring on other sites? I have a blog based on the same information you discuss and would really like to have you share some
stories/information. I know my visitors would value your work.
If you are even remotely interested, feel free to shoot me an e-mail.

My spouse and I stumbled

My spouse and I stumbled over here by a different web page and thought I may as well check things out.
I like what I see so now i'm following you. Look forward to
finding out about your web page for a second time.

Good article. I will be

Good article. I will be dealing with a few of these issues
as well..

M.E.C Mon Electricien

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

Electricien Perpignan

Heya i'm for the first time here. I came across this board and I
in finding It truly helpful & it helped me out much. I'm hoping to give
one thing again and aid others such as you helped
me.

That is very

That is very attention-grabbing, You're a very professional blogger.
I've joined your feed and stay up for seeking extra of your
excellent post. Additionally, I've shared your website in my social networks

Undeniably believe that which

Undeniably believe that which you stated. Your favorite justification seemed
to be on the internet the simplest thing to be aware of.
I say to you, I definitely get annoyed while people think about worries that they
just do not know about. You managed to hit the nail upon the top and defined out the whole thing without having side effect ,
people can take a signal. Will probably be back to get more.
Thanks

Usually I don't read post on

Usually I don't read post on blogs, however I would like to say that this write-up
very pressured me to take a look at and do so!
Your writing style has been surprised me. Thank you, very nice post.

Amazing! Its actually awesome

Amazing! Its actually awesome piece of writing, I have got
much clear idea regarding from this post.

I do not even know the way I

I do not even know the way I stopped up right here, but I assumed this post
was good. I don't realize who you're however definitely you are
going to a famous blogger for those who are not already.
Cheers!

Hi there i am kavin, its my

Hi there i am kavin, its my first occasion to commenting anywhere,
when i read this article i thought i could also make comment due to this brilliant paragraph.

My partner and I stumbled

My partner and I stumbled over here by a different page and thought I might check things out.
I like what I see so now i'm following you. Look forward to looking at your web page again.

This is a topic that is close

This is a topic that is close to my heart...
Thank you! Where are your contact details
though?

It's really a cool and useful

It's really a cool and useful piece of information. I'm glad that
you just shared this useful info with us. Please keep us up to date
like this. Thanks for sharing.

Hello! Someone in my Myspace

Hello! Someone in my Myspace group shared this site with us so I came to look
it over. I'm definitely loving the information. I'm
bookmarking and will be tweeting this to my followers!

Exceptional blog and brilliant design and style.

I'll right away take hold of

I'll right away take hold of your rss as I can't in finding your email subscription hyperlink
or e-newsletter service. Do you have any? Kindly allow me understand so that I may subscribe.
Thanks.

This web site certainly has

This web site certainly has all the information I needed concerning this subject and didn't know who to ask.

My brother suggested I might

My brother suggested I might like this web site.
He was entirely right. This post actually made my day. You cann't imagine simply how
much time I had spent for this info! Thanks!

Willie G youllied I'm more

Willie G youllied

I'm more than happy to find this great site. I wanted to thank you for ones time for this
wonderful read!! I definitely appreciated every little bit
of it and i also have you book-marked to see new information in your blog.

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

Asking questions are actually nice thing if you are not understanding
anything completely, but this post provides fastidious understanding even.

Do you have a spam issue on

Do you have a spam issue on this blog; I also am a blogger,
and I was wanting to know your situation; many of us have
developed some nice procedures and we are looking to trade techniques with
other folks, be sure to shoot me an email if interested.

Thank you a bunch for sharing

Thank you a bunch for sharing this with all folks you really recognise what you are talking approximately!

Bookmarked. Kindly also visit my site =). We will have a hyperlink exchange contract between us

O tempo maximo de tratamento

O tempo maximo de tratamento é de 6 meses, mas de forma não contínua. https://credencial.imasters.com.br/active-c10-la-roche-funciona-anvisa-c...

Awesome blog! Is your theme

Awesome blog! Is your theme custom made or did you download it from somewhere?
A theme like yours with a few simple tweeks would really make my blog stand out.

Please let me know where you got your design. With thanks

Very great post. I simply

Very great post. I simply stumbled upon your weblog and wished to say that I've truly
loved surfing around your blog posts. After all I will be subscribing on your rss
feed and I'm hoping you write again soon!

I savour, cause I discovered

I savour, cause I discovered exactly what I was taking a
look for. You have ended my four day long hunt! God Bless you man. Have a great day.
Bye

For the reason that the admin

For the reason that the admin of this website is working, no uncertainty very shortly it will
be well-known, due to its quality contents.

I am regular reader, how are

I am regular reader, how are you everybody?
This paragraph posted at this web site is truly
pleasant.

I have been surfing online

I have been surfing online more than three hours today, yet I never found
any interesting article like yours. It is pretty worth enough for me.
Personally, if all webmasters and bloggers made good content
as you did, the net will be a lot more useful than ever before.

I visited several web pages

I visited several web pages however the audio quality for audio songs present at this website is actually marvelous.

Aw, this was an extremely

Aw, this was an extremely nice post. Taking a few minutes and actual effort to generate a good
article… but what can I say… I hesitate a lot and never manage to get nearly anything done.

Ahaa, its fastidious

Ahaa, its fastidious conversation concerning this paragraph at this place at this webpage, I have read all that, so at
this time me also commenting at this place.

Nesse texto falaremos tudo o

Nesse texto falaremos tudo o que precisa saber sobre a doença e como um dr.
deve agir. https://credencial.imasters.com.br/pigmentclar-la-roche-funciona-anvisa-...

This information is worth

This information is worth everyone's attention. How can I find out
more?

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.