1. Nikolai
  2. Български
  3. Thursday, 16 February 2012
  4.  Subscribe via email
Здравей, Даниел,
може ли да ми удариш едно рамо? Опитвам да вкарам пхп код в {body}-то на шаблона, но...не мога да го подкарам
ето и кодът:
<?php $user =& JFactory::getUser();
if ($user->guest) { ?>нещо си<?php } ?>
но не ще и не ще. къде бъркам?
Responses (5)
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. # 1
Accepted Answer Pending Moderation
Благодаря за инфото, ще опитам от там.
Само че подобен път при мен липсва - модифицирал съм версията за мои цели, и затова стоя с първата ваша версия, която съм качил - !JoComment 4.0 beta1
сега ще погледна в components/com_comment/joscomment/comment.class.php
поздрави
  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
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. # 4
Accepted Answer Pending Moderation
:) Наложи ми се да правя доработка на една преработка от преди доста време. И за да не губя време - питаh гугъл, който ме прати индиректно във форума.
Целият пост си е офтопик, но...поздрави от последния мохикан - !JoComment 4.0 beta1 (може да е последен, ама е модерно оборудван с rich snippets)
  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

Marker adapted to level of zooming
Hello, I'd like to be able to display a marker showing the number of users on a ...
0 Replies
Posted on Monday, 20 May 2024
Download and install locations from Google
Is there anyway that you can download a list of locations from Google Maps and t...
0 Replies
Posted on Monday, 20 May 2024
Link to maps.google.de in default.php
Hi, i have a question about the default.php under hotspot. i want to integrate...
1 Replies
Posted on Sunday, 19 May 2024
Veranstaltung im Frontend sichtbar obwohl nicht ve
Hallo, folgendes Problem stellt sich mir: Wenn ich eine Veranstaltung dupl...
4 Replies
Posted on Friday, 09 February 2024
Suche bei der Matukio - Fehler Ö Ä Ü..
Hallo, evtl. könnt ihr mir weiterhelfen. Bei mir funktioniert die suche bei ...
3 Replies
Posted on Wednesday, 15 May 2024