Szerző Téma: Komment a hírek alatt???  (Megtekintve 224 alkalommal)

Nem elérhető Doky

  • Full Member
  • ***
  • Hozzászólások: 85
Komment a hírek alatt???
« Dátum: 2011. november 18. 17:38 »
Sziasztok!
Hogyan tudnék komment mezőt tenni a hírek alá, úgy, hogy egy egyszerű szövegdoboz legyen, alatta pedig az eddig küldött hozzászólások jelenjenek meg? Melyik modul lenne a legcélszerűbb?
Inkább én éljek, mint hogy más meghaljon!

Nem elérhető efraim

  • Hero Member
  • *****
  • Hozzászólások: 714
  • himpellér
Azért szőrös a szívem, hogy a szeretetet melegen tartsa

Nem elérhető Doky

  • Full Member
  • ***
  • Hozzászólások: 85
Re:Komment a hírek alatt???
« Válasz #2 Dátum: 2011. november 18. 22:52 »
Köszönöm,megnézem...
Igazából ez a megoldás érdekelne leginkább:
https://developers.facebook.com/docs/reference/plugins/comments/
A kód meglenne, csak nem tudom, melyiket hová kell beilleszteni...
Inkább én éljek, mint hogy más meghaljon!

Nem elérhető efraim

  • Hero Member
  • *****
  • Hozzászólások: 714
  • himpellér
Re:Komment a hírek alatt???
« Válasz #3 Dátum: 2011. november 19. 10:48 »
Ne keverjük a körtét az almával :-) A Facebook az egy dolog, a CMSMS az más. A megadott linkben ott van swzépen leírva, hogy a News modult és a Comment modult hogyan kell összefűzni. A Comment modult pedig a beállításainál kell formázni, majdnem ugyanúgy mint a Facebbokét. Egyébként nincsennek jó tapasznyalataim a Comment modullal, ha pl. a sablonba tettem be, akkor minden cikkre írt comment minden más cikknél is látható volt. Vagyis A-ra adott comment a B és a C ...-nél is megjelent. Ezt csak úgy lehetett megszüntetni, hogy minden cikk végére külön be kellett tenni a modult. Fel is hagytam vele.
Azért szőrös a szívem, hogy a szeretetet melegen tartsa

Nem elérhető Doky

  • Full Member
  • ***
  • Hozzászólások: 85
Re:Komment a hírek alatt???
« Válasz #4 Dátum: 2011. november 19. 14:14 »
Ne keverjük a körtét az almával :-) A Facebook az egy dolog, a CMSMS az más. A megadott linkben ott van swzépen leírva, hogy a News modult és a Comment modult hogyan kell összefűzni. A Comment modult pedig a beállításainál kell formázni, majdnem ugyanúgy mint a Facebbokét. Egyébként nincsennek jó tapasznyalataim a Comment modullal, ha pl. a sablonba tettem be, akkor minden cikkre írt comment minden más cikknél is látható volt. Vagyis A-ra adott comment a B és a C ...-nél is megjelent. Ezt csak úgy lehetett megszüntetni, hogy minden cikk végére külön be kellett tenni a modult. Fel is hagytam vele.

Szóval akkor babrás a dolog...
Akkor inkább hagyom a 'csába.
Inkább én éljek, mint hogy más meghaljon!

Nem elérhető silvertom

  • Hero Member
  • *****
  • Hozzászólások: 927
  • jó pap
    • keresőoptimalizálás- weboldal készítés - seo - cms
Re:Komment a hírek alatt???
« Válasz #5 Dátum: 2011. november 19. 19:55 »
Kommenthez a CGfeedback modult javaslom, tökéletesen működik, minden cikkhez saját komment listát meg lehet vele oldani. Rá kell keresni itt a fórumba, leírtam már...

A sima comment már nem fejlesztett lejárt lemez.

Természetesen a facebook comment-et is tökéletesen be lehet építeni.
Ott egy dolgot kell megoldani, hogy az adott url-t paraméterként megkapja a facebook kód.

Itt meg is lehet nézni http://limelightprojection.com/creations/pecs-cantat-2010

Kell egy felhasználó által definiált tag ami megadja az url-t (van rá cmsms-tag de én így szoktam)
echo "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

Majd ezt a UDT-t beszúrod a facebook kódodba: ( {sajaturl} )

A facebook kódot megtalálod a develeop oldalon, ( lehet, hogy változott. )
<div class="hozzasz">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:comments href="{sajaturl}" num_posts="3" width="295" colorscheme="dark"></fb:comments>
</div>

Szóval ne vezessük félre kérem a kérdezőt!!!!
Hogy mondja doktor úr, elmehetek? NEM elmebeteg! - http://quadrocom.net - http://weboldal-karbantartas.com

Nem elérhető Doky

  • Full Member
  • ***
  • Hozzászólások: 85
Re:Komment a hírek alatt???
« Válasz #6 Dátum: 2011. november 20. 08:27 »
A kód jelenleg így néz ki:
Idézet
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/hu_HU/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<div class="fb-comments" data-href="{sajaturl}" data-num-posts="5"

data-width="600" data-colorscheme="dark"></div>

Ezt a hírek sablonjába kell beilleszteni? A {/foreach} elé, vagy mögé?

Vagy nem lehet ezt az egész kódsort egy UDT-ben rögzíteni?
« Utoljára szerkesztve: 2011. november 20. 08:44 írta Doky »
Inkább én éljek, mint hogy más meghaljon!

Nem elérhető silvertom

  • Hero Member
  • *****
  • Hozzászólások: 927
  • jó pap
    • keresőoptimalizálás- weboldal készítés - seo - cms
Re:Komment a hírek alatt???
« Válasz #7 Dátum: 2011. november 20. 09:38 »
bár nem látom a sablonodat, de szerintem a {/foreach} még a news extra mezőinek a leírása
szóval utána, a legvégére.
A tartalmazó dobozt meg formázod css-ben.

De lehetne az egészet UDT-ben. csakhogy az php, tehát akkor echo "" vagy print "" minden sor
ügyelve az idézőjelekre. Szerintem felesleges meló, de ez a szép az egészben
mindenki azt a megoldást választja amelyiket akarja :)
Hogy mondja doktor úr, elmehetek? NEM elmebeteg! - http://quadrocom.net - http://weboldal-karbantartas.com

Nem elérhető Doky

  • Full Member
  • ***
  • Hozzászólások: 85
Re:Komment a hírek alatt???
« Válasz #8 Dátum: 2011. november 20. 13:21 »
A news sablon így néz ki:
Idézet
{* News module entry object reference:
   ------------------------------
   In previous versions of News the 'object' returned in $entry was quite simple, and a <pre>{$entry|@print_r}</pre> would output all of the available data
   This has changed in News 2.12, the object is not quite as 'simple' as it was in previous versions, and that method will no longer work.  Hence, below
   you will find a referennce to the available data.

   ====
   news_article Object Reference
   ====

     Members:
     --
     Members can be displayed by the following syntax: {$entry->membername} or assigned to another smarty variable using {assign var='foo' value=$entry->membername}.

     The following members are available in the entry array:
   
     id (integer)           = The unique article id.
     author_id (integer)    = The userid of the author who created the article.  This value may be negative to indicate an FEU userid.
     title (string)         = The title of the article.
     summary (text)         = The summary text (may be empty or unset).
     extra (string)         = The "extra" data associated with the article (may be empty or unset).
     news_url (string)      = The url segment associated with this article (may be empty or unset).
     postdate (string)      = A string representing the news article post date.  You may filter this through cms_date_format for different display possibilities.
     startdate (string)     = A string representing the date the article should begin to appear.  (may be empty or unset)
     enddate (string)       = A string representing the date the article should stop appearing on the site (may be empty or unset).
     category_id (integer)  = The unique id of the hierarchy level where this article resides (may be empty or unset)
     status (string)        = either 'draft' or 'published' indicating the status of this article.
     author (string)        = The username of the original author of the article.  If the article was created by frontend submission, this will attempt to retrieve the username from the FEU module.
     authorname (string)    = The full name of the original author of the website. Only applicable if article was created by an administrator and that information exists in the administrators profile.
     category (string)      = The name of the category that this article is associated with.
     canonical (string)     = A full URL (prettified) to this articles detail view using defaults if necessary.
     fields (associative)   = An associative array of field objects, representing the fields, and their values for this article.  See the information below on the field object definition.   In past versions of News this was a simple array, now it is an associative one.
     customfieldsbyname     = (deprecated) - A synonym for the 'fields' member
     fieldsbyname           = (deprecated) - A synonym for the 'fields' member
     useexp (integer)       = A flag indicating wether this article is using the expiry information.
     file_location (string) = A url containing the location where files attached the article are stored... the field value should be appended to this url.
     

   ====
   news_field Object Reference
   ====
   The news_field object contains data about the fields and their values that are associated with a particular news article.

     Members:
     --------
     id (integer)  = The id of the field definition
     name (string) = The name of the field
     type (string) = The type of field
     max_length (integer) = The maximum length of the field (applicable only to text fields)
     item_order (integer) = The order of the field
     public (integer) = A flag indicating wether the field is public or not
     value (mixed)    = The value of the field.


   ====
   Below, you will find the normal detail template information.  Modify this template as desired.
*}

{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
  {assign var='canonical' value=$entry->canonical}
{/if}

<h3 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall}</h3>

<hr id="NewsPostDetailHorizRule" />



<div id="NewsPostDetailContent">
   {eval var=$entry->content}
</div>

{if $entry->extra}
   <div id="NewsPostDetailExtra">
      {$extra_label} {$entry->extra}
   </div>
{/if}

{if $entry->category}
   <div id="NewsPostDetailCategory">
      {$category_label} {$entry->category}
   </div>
{/if}
{if $entry->author}
   <div id="NewsPostDetailAuthor">
      {$author_label} {$entry->author}
   </div>
{/if}
{if $return_url != ""}
<div id="NewsPostDetailReturnLink">{$return_url}{if $category_name != ''} - {$category_link}{/if}</div>
{/if}

{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsDetailField">
        {if $field->type == 'file'}
     {* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}:&nbsp;{eval var=$field->value}
        {/if}
     </div>
{if $entry->postdate}
   <div id="NewsPostDetailDate">
      {$entry->postdate|cms_date_format}{$author_label} {$entry->author}
   </div>

{/if}
  {/foreach}
{/if}

Próbáltam a kódot beilleszteni oldal tartalmába de nem jelent meg semmi...
Inkább én éljek, mint hogy más meghaljon!

Nem elérhető silvertom

  • Hero Member
  • *****
  • Hozzászólások: 927
  • jó pap
    • keresőoptimalizálás- weboldal készítés - seo - cms
Re:Komment a hírek alatt???
« Válasz #9 Dátum: 2011. november 20. 13:29 »
a <script></script> dolgokat, (java, jquery stb...)
mindig az oldal <head> részébe kell tenni. Ez független a cmsms-től...

Ez a Facebook develop oldalán is le van írva...

Vagyis az oldal template-jébe (ahol megjeleníted a news-t) így:

{literal}<script> Amit a facebook adott java script, a FB instrukciói szerint</script>{/literal}

A FB nagyon jól leírja:
3 részből áll a kód -> Fontos a java kell hogy futhasson a szerveren!

1., Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.
-> kód, script, literal stb...

2., Add an XML namespace to the <html> tag of your document. This is necessary for XFBML to work in earlier versions of Internet Explorer.
-> ez önmagáért beszél, html tag-be bele kell tenni

3., maga a comment hívás, ez megy a news template-be
Place the code for your plugin wherever you want the plugin to appear on your page.

Ezeket olvastad?
Hogy mondja doktor úr, elmehetek? NEM elmebeteg! - http://quadrocom.net - http://weboldal-karbantartas.com

Nem elérhető silvertom

  • Hero Member
  • *****
  • Hozzászólások: 927
  • jó pap
    • keresőoptimalizálás- weboldal készítés - seo - cms
Re:Komment a hírek alatt???
« Válasz #10 Dátum: 2011. november 20. 13:31 »
Ha jól látom Te a html5-ös verziót írtad mintában az ugyanez csak 2 elemmel...
Hogy mondja doktor úr, elmehetek? NEM elmebeteg! - http://quadrocom.net - http://weboldal-karbantartas.com

Nem elérhető Doky

  • Full Member
  • ***
  • Hozzászólások: 85
Re:Komment a hírek alatt???
« Válasz #11 Dátum: 2011. november 20. 22:15 »
Na, csak összejött valahogy... De érdekes módon, ha a facebook wall-ról kattintok rá, nem látszik a hozzászólás...
Inkább én éljek, mint hogy más meghaljon!

Nem elérhető SPétör

  • Administrator
  • Hero Member
  • *****
  • Hozzászólások: 2 294
    • CMS Made Simple - Magyarország
Re:Komment a hírek alatt???
« Válasz #12 Dátum: 2011. november 21. 08:47 »
Nekem tele van a ... hócipőm a Facebook-kal... szerintem náluk van elcseszve sok dolog. A honlapon kint lévő támogatóink blokkban mai napig kétszer jelenik meg sok támogató... na akkor vajon ki a hunyó?  :-\
[SP]

Számításaim szerint az én problémám nem is létezik.
--
http://www.cmsmadesimple.hu

Nem elérhető silvertom

  • Hero Member
  • *****
  • Hozzászólások: 927
  • jó pap
    • keresőoptimalizálás- weboldal készítés - seo - cms
Re:Komment a hírek alatt???
« Válasz #13 Dátum: 2011. november 21. 09:41 »
Nem védem őket miért is tenném,
de szerintem addig rakta ki 2x amíg kevesebb like-oló volt mint ahány be volt állatva ill. befért az ablakba.
Én most frissítettem párszor és nem látok ismétlődést. (kivéve persze a nincs kép grafikát...)
Hogy mondja doktor úr, elmehetek? NEM elmebeteg! - http://quadrocom.net - http://weboldal-karbantartas.com

Nem elérhető SPétör

  • Administrator
  • Hero Member
  • *****
  • Hozzászólások: 2 294
    • CMS Made Simple - Magyarország
Re:Komment a hírek alatt???
« Válasz #14 Dátum: 2011. november 21. 11:45 »
Végül is már beletörődtem, de még most is kettőz nekem...
[SP]

Számításaim szerint az én problémám nem is létezik.
--
http://www.cmsmadesimple.hu