1. Nikolai
  2. Български
  3. Thursday, 16 February 2012
  4.  Subscribe via email
Здравей, Даниел,
може ли да ми удариш едно рамо? Опитвам да вкарам пхп код в {body}-то на шаблона, но...не мога да го подкарам
ето и кодът:
<?php $user =& JFactory::getUser();
if ($user->guest) { ?>нещо си<?php } ?>
но не ще и не ще. къде бъркам?
Responses (5)
Accepted Answer Pending Moderation
:) Наложи ми се да правя доработка на една преработка от преди доста време. И за да не губя време - питаh гугъл, който ме прати индиректно във форума.
Целият пост си е офтопик, но...поздрави от последния мохикан - !JoComment 4.0 beta1 (може да е последен, ама е модерно оборудван с rich snippets)
  1. more than a month ago
  2. Български
  3. # 1
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
аааа, точно в comment.class.php e JOSC_post класа. В новата версия всичките класове които са в comment.class.php са пръснати в отделни файлове...

Поздрави,
Даниел
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Български
  3. # 2
Accepted Answer Pending Moderation
:) Да, точно там:
/*
* construct HTML (by replacement...)
*/
$html .= "<div id='comment'>";

$html .= $this->_body;

$html = JOSC_utils::checkBlock('library', $this->_template_library, $html); /* js scripts ... */
$html = JOSC_utils::checkBlock('ads', false, $html, $this->insertAds());
$html = JOSC_utils::checkBlock('menu', false, $html, $this->insertMenu());
$html = JOSC_utils::checkBlock('post', false, $html, $this->insertComments());
/*number of comments - it is better to do it here as we already have populated the $this->_total variable */
$html = str_replace('{NUMBER_OF_COMMENTS}', $this->_number_of_comments , $html);
$html = JOSC_utils::checkBlock('form', false, $html, $this->insertForm());
$html = JOSC_utils::checkBlock('pagenav', false, $html, $this->insertPageNav());
$html = JOSC_utils::checkBlock('poweredby', false, $html, $this->insertPoweredby());
}
остава само да го направя както ми трябва
благодаря отново, Даниел
  1. more than a month ago
  2. Български
  3. # 3
Accepted Answer Pending Moderation
Благодаря за инфото, ще опитам от там.
Само че подобен път при мен липсва - модифицирал съм версията за мои цели, и затова стоя с първата ваша версия, която съм качил - !JoComment 4.0 beta1
сега ще погледна в components/com_comment/joscomment/comment.class.php
поздрави
  1. more than a month ago
  2. Български
  3. # 4
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
Няма да стане, понеже това си е html file и ние го парсваме сами. CComment5 ще ползва joomla template системата и там такъв код би функционирал.

При версия 4, ще трябва да се занимаваш с промени директно в php класовете.

components/com_comment/classes/joomlacomment/JOSC_post.php в този файл погледни post_htmlCode функцията. Там може би ще ти стане ясно как заменяма {podobni_stringowe} с някакъв output. Тъпа работа :(, но преди 6 години нямаше joomla templating... и това си беше добър начин за работа...

Поздрави,
Даниел
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Български
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Last questions

Is Ccomment still alive?
Is Ccomment still being supported? It's time for my Pro renewal but I haven't se...
0 Replies
Posted on Thursday, 14 August 2025
  • New
  • Anzeige von mehrtägigen Events auf Buchungsseite
    We have been using Matukio for quite some time now. Unfortunately, we have been ...
    3 Replies
    Posted on Sunday, 03 August 2025
    Assistance Needed – Error When Posting Comments
    Hello, I’m experiencing an issue when trying to submit a comment on my site u...
    0 Replies
    Posted on Sunday, 10 August 2025
  • New
  • Hotspots Pro 6.0.13 compatability with Joomla 5.3.
    Running Hotspots Pro 6.0.13 on Joomla 4.4.13 and want to upgrade to Joomla 5.3.1...
    2 Replies
    Posted on Friday, 04 July 2025
    some questions on Hotspots
    Hi, On Hotspots extension : 1) is it possible to add our own map layer / v...
    0 Replies
    Posted on Thursday, 03 July 2025