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

I was suggested this website

I was suggested this website by my cousin.
I'm not sure whether this post is written by him as nobody else know such detailed about my problem.
You are incredible! Thanks! https://allmynursejobs.com/author/neil44023/

Hello, i think that i saw you

Hello, i think that i saw you visited my
site so i came to “return the favor”.I'm trying to find things to improve
my site!I suppose its ok to use a few of your ideas!! https://revivetruth.com/members/manmeat0/activity/14067/

http://westchesterny.org/__me

If some one wishes to be

If some one wishes to be updated with most up-to-date technologies after that he must be
pay a quick visit this site and be up to date
all the time.

Hello, I enjoy reading

Hello, I enjoy reading through your article post.
I wanted to write a little comment to support you.

Thanks for sharing such a

Thanks for sharing such a pleasant opinion, article is pleasant,
thats why i have read it completely

I was curious if you ever

I was curious if you ever thought of changing the structure of your
site? 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?

It's fantastic that you are

It's fantastic that you are getting thoughts from this paragraph as
well as from our dialogue made at this time.

I was curious if you ever

I was curious if you ever considered changing the layout 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 two pictures.
Maybe you could space it out better? https://caidenmcrg59269.blogsumer.com/2982172/seo

Hi there to all, the contents

Hi there to all, the contents existing at this website
are really awesome for people knowledge, well, keep up the good work fellows.

Your mode of describing

Your mode of describing everything in this paragraph is
really nice, all be capable of without difficulty know it, Thanks a lot.

Wow, marvelous weblоg

Wow, marvelous weblоg structure! Howw long have you ever
been blogging for? you made blogginng look easy.
The total glance of your site isѕ wonderful, as neatly as the content! https://brimur1ee2.gitbook.io/edwinhnud538/kenapa-daftar-agen-bola-sbobe...

Hurrah! Finally I purchased a

Hurrah! Finally I purchased a website from where I have the
capacity to in fact get valuable facts regarding my study and knowledge.

Hi there, this weekend is

Hi there, this weekend is nice designed for me, because this time i am reading this great educational piece of
writing here at my home.

What's up, I log on to your

What's up, I log on to your blog like every week.

Your writing style is awesome, keep doing what you're doing!

Saved as a favorite, I love

Saved as a favorite, I love your blog!

Hi there superb website! Does

Hi there superb website! Does running a blog like this take a large amount of work?
I have absolutely no understanding of programming
but I had been hoping to start my own blog soon. Anyway, should you have any
recommendations or tips for new blog owners please share.
I know this is off topic but I simply needed to ask.
Thanks a lot!

Because the admin of this web

Because the admin of this web page is working, no question very shortly it will be well-known, due to its
feature contents.

Hey There. I found your blog

Hey There. I found your blog using msn. This is an extremely well written article.
I will make sure to bookmark it and come back to read more of your useful info.
Thanks for the post. I will definitely return.

Ahaa, its fastidious dialogue

Ahaa, its fastidious dialogue concerning this paragraph here at this weblog, I have read
all that, so at this time me also commenting here.

Write more, thats all I have

Write more, thats all I have to say. Literally, it seems as though you
relied on the video to make your point. You clearly know what youre talking
about, why throw away your intelligence on just posting videos to your site when you could be giving us something
enlightening to read? https://neil44023.dreamwidth.org/profile

continuously i used to read

continuously i used to read smaller content which also clear their motive, and that is also happening with this piece of writing which I am reading at this place. https://www.railsroot.com/profiles/36151-neil-loh

It's enormous that you are

It's enormous that you are getting ideas from this piece of writing as well as from our discussion made here.

I absolutely love your blog

I absolutely love your blog and find most of your
post's to be just what I'm looking for. Do you offer
guest writers to write content for you personally?
I wouldn't mind writing a post or elaborating on a few of the subjects you write with regards to here.
Again, awesome weblog!

With havin so much written

With havin so much written content do you ever run into any issues of plagorism or copyright
infringement? My site has a lot of unique content I've either authored
myself or outsourced but it seems a lot of it is popping it up all over the web without my
agreement. Do you know any techniques to help prevent content from being ripped off?

I'd certainly appreciate it.

Ηello there! Do you now if

Ηello there! Do you now if they make ɑany plugins to help with Searсh Engine Optimization? I'm trying
to get my blоg to rank for some targeted keywords but I'm not seeing very good success.
If you know of any pleaѕe share. Kudos! http://www.firefightersworldwide.com/2013/12/responding-virginia-fire-en...

Great article! We will be

Great article! We will be linking to this particularly great article on our website.
Keep up the good writing.

Good day! I know this is

Good day! 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 post or vice-versa? My website goes over
a lot of the same topics as yours and I feel we could greatly benefit from each other.
If you happen to be interested feel free to shoot me an email.
I look forward to hearing from you! Fantastic blog by the way!

Great post. I was checking

Great post. I was checking continuously this blog and I am impressed!
Very helpful info particularly the last part :) I care for
such information a lot. I was looking for this particular information for a very long time.
Thank you and best of luck.

When someone writes an piece

When someone writes an piece of writing he/she maintains the plan of
a user in his/her brain that how a user can understand it.
Thus that's why this piece of writing is amazing. Thanks!

Hi there! Do you use Twitter?

Hi there! Do you use Twitter? I'd like to follow you if that would be ok.
I'm absolutely enjoying your blog and look forward
to new updates.

Hi there, yes this article is

Hi there, yes this article is genuinely nice and I have learned lot of things from it concerning blogging.

thanks.

Hmm is anyone else

Hmm is anyone else experiencing problems with the pictures on this blog
loading? I'm trying to figure out if its a problem on my end
or if it's the blog. Any suggestions would be greatly appreciated.

Thank you for sharing your

Thank you for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your next write ups thank you once again.|

fantastic issues altogether,

fantastic issues altogether, you just won a new reader.
What may you recommend in regards to your put up that you
made a few days ago? Any sure?

It nonetheless integrated

It nonetheless integrated sports betting legislation pending a transform in federal law.

Wonderful blog! I found it

Wonderful blog! I found it while searching on Yahoo News.
Do you have any suggestions on how to get listed in Yahoo News?
I've been trying for a while but I never seem
to get there! Appreciate it

You will discover a smooth

You will discover a smooth blue that sits well subsequent
to a white background.

On-line sports betting by way

On-line sports betting by way of internet websites and mobile apps are in the forecast.

My coder is trying to

My coder is trying to convince me to move to .net from PHP.

I have always disliked the idea because of the expenses.
But he's tryiong none the less. I've been using WordPress on various websites for about a year and
am anxious about switching to another platform. I have heard very good things
about blogengine.net. Is there a way I can transfer
all my wordpress content into it? Any kind of help would
be really appreciated!

I think this is one of the

I think this is one of the most important information for me.
And i'm glad reading your article. But wanna remark on few
general things, The site style is wonderful, the articles is really great :
D. Good job, cheers

I want to to tһank yoս fоr

I want to to tһank yoս fоr tһis excellent read!!

I absolutely enjoyed evеry bit of it. I've got you book-markеd to check
out new stuff youu post… http://p.ptscvn.com/UserProfile/tabid/134/userId/4868860/Default.aspx

It permits on the net and

It permits on the net and retail wagering on sporting events across a range of sports, as authorized by PGCB.

I've learn some just right

I've learn some just right stuff here. Definitely worth bookmarking for revisiting.
I surprise how so much effort you put to make the sort of magnificent informative website.

My ρrogrammeг is trying to

My ρrogrammeг is trying to persuade me tο move to .net
from PHP. I have alwаys dislike thhe idea because of the
costs. Buut he's tryiong none the less. I've been using Movable-typе on a number of websites for
abouit a year аnd am nervous abgout switching to another platform.

I have hearԁ fantastic things about blogengine.net. Is there a wɑy I cаn transsfer all my
wordpress content into it? Any kind of hewlp would ƅee greatly appreciated! https://Academico.eu/forums/users/lynellbirtles58/

Appreciate the

Appreciate the recommendation. Let me try it out.

Hi would you mind letting me

Hi would you mind letting me know which web host you're working with?
I've loaded your blog in 3 completely different browsers and I must say this blog loads a lot quicker then most.

Can you suggest a good web hosting provider at
a honest price? Kudos, I appreciate it!

Great article! That is the

Great article! That is the type of information that are
meant to be shared around the web. Disgrace on the search engines
for no longer positioning this publish upper! Come on over and consult
with my site . Thanks =)

I've been browsing on-line

I've been browsing on-line greater than three hours today, but I never discovered any
fascinating article like yours. It is pretty worth enough for
me. Personally, if all web owners and bloggers made excellent content as
you did, the web can be a lot more useful than ever before.

Hi everybody, here every one

Hi everybody, here every one is sharing these experience, thus it's nice to read this blog,
and I used to pay a visit this blog daily.

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.