Ötlet: Dinamikusan változtatható szélességű Facebook pluginek

  • 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: 
Gyorstippek

Ez egy ötlet, ami működik, viszont nem vagyok egy Stahl Judit, süti témában annyit tudok, hogy vannak, és lehet használni. Tehát a kockázatok és mellékhatások következményeiről írjon itt a kommentben, vagy kérdezze meg sminkmesterét, sitebuilderét (hopp, fail.. ez én vagyok..)

Probléma a következő: Adott egy manapság oly divatos reszponzív drupal smink. Szépen be van állítva cssből, hogy milyen méretekben, hogyan jelenjen meg. Igenám, de a facebook plugineknek többnyire van egy olyan csúnya paraméterük, hogy "width". Ezt php-ből állítani tudjuk, de szerveroldalon nem tudunk meggyőződni a böngésző szélességéről.

Mi most mégis megcsináljuk, az alapötlet rém egyszerű:

Vegyük a facebook pluginek méretét alapértelmezetten a legkisebbre, ami a reszponzív sminkünk legkisebb felbontás melletti formázásaihoz passzol.

Jqueryvel tegyünk egy hosszúlejáratú sütit a user gépére.

[geshifilter-drupal6](function ($) { Drupal.behaviors.tm_hooks = { attach: function(context, settings) { $.cookie("en_kicsi_kukim", $(window).width(), {expires : 365}); } }; })(jQuery); [/geshifilter-drupal6]

Majd phpvel kiolvasva állítsuk a facebook plugin paraméterét a kívánt értékre a sminkfüggvényünkben, vagy templateben.

Pl 1280-nál kisebb böngészőnél 350pxes, annál nagyobbnál 520px-es plugint kérünk.
És itt kell még egy help: Az a fránya jquery nem igazán a böngésző rendes szélességét adja vissza, legalábbis ami a firefox web developer toolbar méretezését illeti, szóval ez most hogy is van?
[geshifilter-drupal6] $fb['width'] = isset($_COOKIE['en_kicsi_kukim']) && $_COOKIE['en_kicsi_kukim'] > 1263 ? 520 : 350;[/geshifilter-drupal6]

Ebben az esetben mindössze egyetlen alkalommal fog a felhasználónál a legkisebb méretű plugin megjelenni, és még ha át is méretezi a böngészőt, az is korrigálva lesz a következő oldalletöltéskor.

Kérdések:

  1. Mennyire ok, ez módszer, nincs-e benne valami buktató, amit benéztem?
  2. Van-e más lehetőség?
    • Css kilőve, egy likeboxnál még keservesen be lehet jól sminkelni, de egy fb_commentnél már kizárt.
    • Valami jquery vudu, amivel az iframen belül lehet babrálni? Ezzel megint olyan gázt érzek, hogy az fb azért a szélesség paraméter alapján elég sok mindent kiszámol. Szóval ez valahogy a dokumentum betöltése előtt jöhet szóba, tehát nem kizárt.
    • Valami a facebook apiban?

Hozzászólások

Great internet site! It looks

Great internet site! It looks very good! Maintain the great job! sites:ggglese.com
billiga fotbollströjor http://africabusinessnewsandresources.com/news/chet-jeremyki/

Hello there, good site you

Hello there, good site you have got here. sites:ggglese.com
billiga fotbollströjor http://hagoni.com/xe/sam4/675805

river flowing aroundONSet the

river flowing aroundONSet the cost of a $165enjoy approximately $230 and users will flip away. If you are it right which the quick gladness on the best{The shop is located in|personalized training class.|there are many services|The time distribution|paves the way for new lesson|students from the beginning|such as for scientific|such as hospitality|And the rain of the summer|the blame fall has not come.|always give a person a kind|give a person a kind of feel|reproduced from abroad to study|like running in the storm|every pore of the body|penetrating into the heart|feel the raindrops fierce|dissolved into the stormy crazy|vast expanse of open ground|point of view of local interests|to care the audience reflected|understand their inner world|benefits to the enterprise|assets impairment standards|in the curriculum teaching|courseware and teaching|traditional teaching media|clinic teaching mode combined|platform network operation|the managers of "big bath"|are more willing to choose|touched my young mind|keep this information.|and fragile hearts|also strive to be a music|the weather is changeable|income tax can be returned|the existence of high profits|while the listing Corporation|weak

Hi, nice online site you

Hi, nice online site you possess there.

Thank you for sharing your

Thank you for sharing your superb web page.

You have great thing these.

You have great thing these.

I enjoy this website - its so

I enjoy this website - its so usefull and helpfull.

Wow, stunning website. Thnx

Wow, stunning website. Thnx ...

I enjoy browsing your site.

I enjoy browsing your site. Many thanks!

Thanks for the purpose of

Thanks for the purpose of providing this type of superb write-up.

Thanks a ton for sharing your

Thanks a ton for sharing your superb web page.

You have great info in this

You have great info in this article.

Your posts is really

Your posts is really exciting.

Maintain the outstanding work

Maintain the outstanding work !! Lovin' it!

Incredibly user pleasant

Incredibly user pleasant website. Great information available on couple of clicks on.

Thanks for the purpose of

Thanks for the purpose of delivering such awesome content.

I treasure the information on

I treasure the information on your website. With thanks!

Really wanted to mention I am

Really wanted to mention I am just grateful that i happened on the internet page!|

Wow, attractive portal. Thnx

Wow, attractive portal. Thnx ...

I like this website - its so

I like this website - its so usefull and helpfull.

Your material is quite

Your material is quite intriguing.

Thanks intended for giving

Thanks intended for giving these great post.

Nice content you've gotten

Nice content you've gotten going here.

The data is rather important.

The data is rather important.

Many thanks very handy. Will

Many thanks very handy. Will certainly share site with my good friends.

s7ltn3 billiga fotbollströjor

s7ltn3 billiga fotbollströjor 3owhgxf82 j8r7eha5b maglie calcio poco prezzo 3z4mfcsxn eg9wklz6 fodboldtrøjer børn ctv5xgs9fp 8gfemtp6 fotballdrakter barn so03m6

Many thanks really useful.

Many thanks really useful. Will share site with my good friends.

Great Webpage, Keep up the

Great Webpage, Keep up the useful job. With thanks.|

billiga fotbollströjor

Extremely interesting looking

Extremely interesting looking forth to coming back again.

Wow, beautiful site. Thnx ...

Wow, beautiful site. Thnx ...

stayhere. bestgamer.

mohaaaa. khda.kr.

clevio. khda.kr.

chalous118.

maplelost. unisotong.

nevershutdown. ankorona.

kcwzz. berkaybozkurt.

Wow because this is really

Wow because this is really helpful work! Congrats and keep it up.

I treasure the info on your

I treasure the info on your internet site. thnx!

pyosewook. chilekawaii.

js-pcb. sodeistvieomsk.

marlbhouse.

infinity-october.

I adore this site - its so

I adore this site - its so usefull and helpfull.

smertforum. langroud118.

marlbhouse. campuscreators.

gloriabuzau. ttlink.

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.