You need flash player!

Pobierz Adobe Flash Player

Dodatkowe usługi

Dla mniej wtajemniczonych webmasterów, którzy pragną stworzyć własną witrynę na bazie 4images, wykonuję instalację i modyfikację skryptu. Ponadto prowadzę bezpośrednie wsparcie witryny (administracja).

Promocja

HomeForum
Witamy, Gościu
Nazwa użytkownika Hasło: Zapamiętaj mnie

MOD - Wszystkie komentarze
(1 przeglądających) (1) Gość
  • Strona:
  • 1

TEMAT: MOD - Wszystkie komentarze

MOD - Wszystkie komentarze 11 lata, 4 mies. temu #14

  • andreoid
  • Offline
  • Administrator
  • Posty: 29
  • Oklaski: -1
oryginalny tytuł [MOD] All Comments
Autor: mawenzi
Wersja: v1.6
Kompatybilne z 4images wersją 1.7 - 1.7.9

Modyfikacja Wszystkie komentarze jest jakby rozszerzeniem przedstawionego już MOD'u - Ostatnie komentarze
Dodatkowa zostanie includowana strona, na której wyświetlone będą wszystkie komentarze napisane w galerii.
Jest to bardzo przydatna modyfikacja w sytuacji, kiedy galeria ma charakter dyskusyjny.
Do prawidłowego stronicowania każdej strony listy komentarzy, należy mieć zainstalowane następujące modyfikacje:
  • [MOD] Universal Paging Class v1.1 - Uniwersalne stronicowanie klas
  • [MOD] Paging for Comments - Stronicowanie dla komentarzy


Demo

Instalacja: ... Łatwa
Czas: ......... około 40 minut

Zmienione zostaną pliki:
includes/page_header.php
lang/polish/main.php
templates/twoj_szablon/user_logininfo.html
templates/twoj_szablon/user_loginform.html

Nowe pliki:
comments_all.php
templates/twoj_szablon/comments_all.html
templates/twoj_szablon/comments_all_bit.html
templates/twoj_szablon/commentsperpage_dropdown_form.html

Krok 1

Stwórz nowy plik comments_all.php i zapisz go w katalogu głównym 4image
<?php
/*************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: comments_all.php Version 1.6 *
* Copyright: (C) 2002 Jan Sorgalla *
* Email:
jan@4homepages.deAdres poczty elektronicznej jest chroniony przed robotami spamującymi. W przeglądarce musi być włączona obsługa JavaScript, żeby go zobaczyć.
*
* Web: http://www.4homepages.de *
* Scriptversion: 1.7.x *
**************************************************************************
* Die comments_all.php ist nicht Bestandteil des Originalscripts ! *
* Erstellt durch : mawenzi - www.detlev-kostka.de *
* : loda - www.loda.de ... Danke ! *
* *
*************************************************************************/

 
 
$main_template = 'comments_all';
$templates_used = 'comments_all_bit';
 
define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');
 
if (isset($HTTP_POST_VARS['commentsetperpage']) || isset($HTTP_GET_VARS['commentsetperpage'])) {
$commentsetperpage = (intval($HTTP_POST_VARS['commentsetperpage']) ) ? intval($HTTP_POST_VARS['commentsetperpage']) : intval($HTTP_GET_VARS['commentsetperpage']);
if ($commentsetperpage) {
$site_sess->set_session_var("commentperpage", $commentsetperpage);
$session_info['commentperpage'] = $commentsetperpage;
}
}
 
if (isset($session_info['commentperpage'])) {
$commentperpage = $session_info['commentperpage'];
}
else {
$commentperpage = 10;
}
$commentsperpage_dropdown = "\n<select name=\"commentsetperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['commentsperpage'].submit() }\" class=\"select\">\n";
for($i = 1; $i <= 20; $i++) {
$setvalue = 1 * $i;
$commentsperpage_dropdown .= "<option value=\"".$setvalue."\"";
if ($setvalue == $commentperpage) {
$commentsperpage_dropdown .= " selected=\"selected\"";
}
$commentsperpage_dropdown .= ">";
$commentsperpage_dropdown .= $setvalue;
$commentsperpage_dropdown .= "</option>\n";
}
$commentsperpage_dropdown .= "</select>\n";
 
$site_template->register_vars("commentsperpage_dropdown", $commentsperpage_dropdown);
$commentsperpage_dropdown_form = $site_template->parse_template("commentsperpage_dropdown_form");
$site_template->register_vars("commentsperpage_dropdown_form", $commentsperpage_dropdown_form);
 
$cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN").", ".get_auth_cat_sql("auth_readcomment", "NOTIN").", ".get_auth_cat_sql("auth_viewimage", "NOTIN");
 
if (isset($HTTP_GET_VARS['user_id']) and $HTTP_GET_VARS['user_id'] != ""){
$add_where = "WHERE c.user_id IN (".$user_id.") AND i.cat_id NOT IN ($cat_id_sql)";
}else{
$add_where = "WHERE i.cat_id NOT IN ($cat_id_sql)";
}
 
$sql = "SELECT COUNT(*) AS comments
FROM "
.COMMENTS_TABLE." c
LEFT JOIN "
.IMAGES_TABLE." i ON (i.image_id = c.image_id)
WHERE i.cat_id NOT IN ($cat_id_sql)"
;
$result = $site_db->query_firstrow($sql);
$site_db->free_result();
$num_comments = $result['comments'];
if ($action == "postcomment") {
$page = ceil($num_comments / $commentperpage);
}
$num_rows_all = (isset($num_comments)) ? $num_comments : 0;
$link_arg = $site_sess->url(ROOT_PATH."comments_all.php");
include(ROOT_PATH.'includes/paging.php');
$getpaging = new Paging($page, $commentperpage, $num_rows_all, $link_arg, $lang['comment_stats'], "comments");
$offset = $getpaging->get_offset();
$site_template->register_vars(array(
"paging" => $getpaging->get_paging(),
"paging_stats" => ($num_comments) ? $getpaging->get_paging_stats() : ""
));
 
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_date".get_user_table_field(", u.", "user_level")."
FROM "
.COMMENTS_TABLE." c
LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
LEFT JOIN "
.IMAGES_TABLE." i ON (i.image_id = c.image_id) ".$add_where."
ORDER BY c.comment_date DESC
LIMIT $offset, $commentperpage"
;
 
$result = $site_db->query($sql);
$comment_row = array();
while ($row = $site_db->fetch_array($result)) {
$comment_row[] = $row;
}
$site_db->free_result($result);
$num_comments = sizeof($comment_row);
if (!$num_comments) {
$comments_all = "<tr><td class=\"commentrow1\" colspan=\"2\">".$lang['no_comments']."</td></tr>";
}
else {
$comments_all = "";
$ii = 1;
for ($i = 0; $i < $num_comments; $i++) {
$image_id = $comment_row[$i]['image_id'];
$sql = "SELECT i.image_id, i.cat_id, i.image_name, c.cat_name, i.image_media_file, i.image_thumb_file".get_user_table_field(", u.", "user_id").get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name")."
FROM ("
.IMAGES_TABLE." i, ".CATEGORIES_TABLE." c)
LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
"
.$add_where."
AND i.image_id = "
.$image_id." AND c.cat_id = i.cat_id ";
$image_row = $site_db->query_firstrow($sql);
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
$comment_counter = $num_rows_all-($offset+$i);
if (check_permission("auth_readcomment", $cat_id)){
$comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
$comment_user_id = $comment_row[$i]['user_id'];
$user_row_comment = get_user_info($comment_user_id);
$comment_user_profile_link = "";
$comment_user_info = $lang['userlevel_guest'];
if (!isset($comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
$comment_user_info = $lang['userlevel_user'];
}
elseif ($comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
$comment_user_info = $lang['userlevel_admin'];
}
if ( $user_info['user_level'] == GUEST ) {
$comment_user_profile_link = "";
} else {
if ( $comment_user_id == -1 ) {
$comment_user_profile_link = "";
} else {
$comment_user_profile_link = $site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$comment_user_id);
}
}
$comment_user_link = ($comment_user_profile_link) ? "<a href=\"".$comment_user_profile_link."\">".$comment_user_name."</a>" : $comment_user_name;
 
 
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0)) {
$thumb_file = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}else {
$thumb_file = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
$thumb_info = @getimagesize($thumb_file);
$width = $thumb_info[0];
$height = $thumb_info[1];
$dimension = 100;
$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dimension;
$new_height = floor(($dimension/$width) * $height);
}else {
$new_width = floor(($dimension/$height) * $width);
$new_height = $dimension;
}
$text = $comment_row[$i]['comment_text'];
$text = format_text($text, $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']);
$admin_links = "";
if ($user_info['user_level'] == ADMIN) {
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("comments.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id']))."\" target=\"admin_edit\">".$lang['delete']."</a>";
}
$sql = "SELECT COUNT(*) AS total_image_comments FROM ".COMMENTS_TABLE." WHERE image_id = ".$image_id."";
$row = $site_db->query_firstrow($sql);
$total_image_comments = $row['total_image_comments'];
 
$site_template->register_vars(array(
"total_image_comments" => $total_image_comments,
"comment_counter" => $comment_counter,
"comment_image_thumb" => (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? "<img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" onClick=\"alert('".((isset($lang['auth_alert'][$cat_id])) ? $lang['auth_alert'][$cat_id] : $lang['auth_alert']['default'])."');\" border=\"".$config['image_border']."\">" : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\"><img src=\"".$thumb_file."\" width=\"".$new_width."\" height=\"".$new_height."\" border=\"".$config['image_border']."\"></a>",
"comment_image_name" => (!check_permission("auth_viewcat", $cat_id) || !check_permission("auth_viewimage", $cat_id)) ? $image_row['image_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$comment_row[$i]['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" style=\"color:#fcdc43;\">".$image_row['image_name']."</a>",
"comment_cat_name" => (!check_permission("auth_viewcat", $cat_id)) ? $image_row['cat_name'] : "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id)."\" style=\"color:#fcdc43;\">".$image_row['cat_name']."</a>",
"comment_user_name" => $comment_user_link,
"comment_user_info" => $comment_user_info,
"comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0, 1, 1),
"comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1 , 1),
"comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
"image_user_name" => ($image_row[$user_table_fields['user_level']] != GUEST) ? "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$image_row[$user_table_fields['user_id']])."\">".htmlspecialchars($image_row[$user_table_fields['user_name']])."</a>" : $lang['userlevel_guest'],
"admin_links" => $admin_links,
"lang_variable_text" => $lang['variable_text'],
"lang_navigation" => $lang['navigation'],
"lang_com_per_page" => $lang['com_per_page'],
"lang_com" => $lang['com'],
"lang_for_image" => $lang['for_image'],
"lang_in_cat" => $lang['in_cat'],
"lang_com_date" => $lang['com_date'],
"lang_com_by" => $lang['com_by'],
"lang_com_to_this" => $lang['com_to_this'],
"lang_com_total" => $lang['com_total']
));
$comments_all .= $site_template->parse_template("comments_all_bit");
}
}
}
$site_template->register_vars("comments_all", $comments_all);
unset($comments_all);
 
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$lang['all_comments']."</span>";
$site_template->register_vars("clickstream", $clickstream);
 
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>


Krok 2

Stwórz nowy plik comments_all.html, ścieżka templates/twoj_szablon/comments_all.html
{header}
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablehead">
<tr>
<td width="100%" colspan="4"><table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="6"><img src="{template_url}/images/header_top_left.gif" width="6" height="6" alt="" /></td>
<td width="100%"><img src="{template_url}/images/header_top.gif" width="100%" height="6" alt="" /></td>
<td width="6"><img src="{template_url}/images/header_top_right.gif" width="6" height="6" alt="" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="6"><img src="{template_url}/images/header_left.gif" width="6" height="60" alt="" /></td>
<td width="100%"><img src="{template_url}/images/header_logo.gif" width="405" height="60" alt="" /></td>
<td width="225" align="right">
<form method="post" action="{url_search}">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td>
<input type="text" name="search_keywords" size="15" class="searchinput" />
</td>
<td>
<input type="submit" value="{lang_search}" class="button" name="submit" />
</td>
</tr>
<tr valign="top">
<td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
</tr>
</table>
</form>
</td>
<td align="right" width="6"><img src="{template_url}/images/header_right.gif" width="6" height="60" alt="" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="bordercolor">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tablebgcolor">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="navbar" height="23">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
<td align="right">
<a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" valign="top" class="row2">
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">{user_box} </td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{if random_image}
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td align="center" class="row1">
<br />
{random_image}
<br />
<br />
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
{endif random_image}
</td>
<td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
<td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
<td width="100%" valign="top"><br />
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="title">{lang_all_comments}</span></td>
<td align="right" valign="bottom">
</td>
</tr>
</table>
<hr size="1" />
<br />
{lang_variable_text}
<br />
{if paging}{if paging_stats}
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="65%" class="row1" valign="middle">
{paging_stats}
</td>
<td width="30%" class="row1" valign="middle" align="right">
{lang_com_per_page}
</td>
<td width="5%" class="row1" valign="top" align="right">
{commentsperpage_dropdown_form}
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="row1" valign="top" align="left">{lang_navigation}</td>
<td class="row1" valign="top" align="right">{paging}</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
{endif paging_stats}{endif paging}
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
{comments_all}
</td></tr></table>
<br />
{if paging}
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="head2">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="row1" valign="top" align="left">{lang_navigation}</td>
<td class="row1" valign="top" align="right">{paging}</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
{endif paging}
 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{category_dropdown_form}</td>
<td align="right">{setperpage_dropdown_form}</td>
</tr>
</table>
<p>&nbsp;</p>
</td>
<td width="20" valign="top"><img src="{template_url}/images/spacer.gif" width="19" height="19" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablebottom">
<tr>
<td width="6" nowrap><img src="{template_url}/images/footer_left.gif" width="6" height="19" alt="" /></td>
<td width="100%"></td>
<td width="6" nowrap><img src="{template_url}/images/footer_right.gif" width="6" height="19" alt="" /></td>
</tr>
</table>
</td>
</tr>
</table>
{footer}

Wygląd szablonu jest oczywiście inwidualną sprawą. W pliku comments_all.html, stosowane są następujące zmienne:
{if paging}
{paging}
{endif paging}
{if paging_stats}
{paging_stats}
{endif paging_stats}
{commentsperpage_dropdown_form}
oraz zmienne tekstu (językowe)
{lang_all_comments}
{lang_variable_text}
{lang_com_per_page}
{lang_navigation}
{comments_all}

Krok 3

Stwórz nowy plik comments_all_bit.html, ścieżka templates/twoj_szablo/comments_all_bit.html
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td class="bordercolor">
<table width="100%" border="0" cellspacing="1" cellpadding="4">
<tr>
<td colspan="2" class="head2" height="20">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr><td class="head1" valign="top" width="75%">
<b>{comment_counter}. {lang_com}</b> <small>{lang_for_image}</small><b> {comment_image_name}</b> <small>- [{lang_in_cat} {comment_cat_name}]</small></td>
<td class="head1" valign="top" align="right" width="25%">
<small>[{lang_com_date} <b>{comment_date}</b>]</small></td>
</tr></table>
</td>
</tr>
<tr>
<td width="15%" rowspan="2" class="row2" valign="top" align="center">
{comment_image_thumb}
{image_user_name}
</td>
<td width="85%" class="row2" valign="top" align="left"><b>{comment_headline}</b>&nbsp;<small>[{lang_com_total} {total_image_comments} {lang_com_to_this}]</small><hr size="1">{comment_text}<br></td>
</tr><tr>
<td class="row1" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="50%">
<small>{lang_com_by} : {comment_user_name} [{comment_user_info}]</small></td>
<td align="right" width="50%">
<small>{if admin_links}{admin_links}{endif admin_links}</small></td>
</tr></table>
</td>
</tr>
</td></tr></table>
</td></tr></table>
<br>
</td></tr>

Wygląd szablonu jest oczywiście inwidualną sprawą. W pliku comments_all_bit.html, stosowane są następujące zmienne:
{comment_counter}
{total_image_comments}
{comment_image_name}
{comment_cat_name}
{comment_date}
{comment_image_thumb}
{comment_headline}
{comment_text}
{comment_user_name}
{comment_user_info}
{image_user_name}
{if admin_links}
{admin_links}
{endif admin_links}
oraz zmienne tekstu (językowe)
{lang_com}
{lang_for_image}
{lang_in_cat}
{lang_com_date}
{lang_com_by}
{lang_com_total}
{lang_com_to_this}

Krok 4

Stwórz nowy plik commentsperpage_dropdown_form.html, ścieżka templates/twoj_szablo/commentsperpage_dropdown_form.html
<table border="0" cellspacing="0" cellpadding="0"> 
<form method="post" action="{self}" name="commentsperpage">
<tr>
<td>{commentsperpage_dropdown}</td>
</tr>
</form>
</table>


Krok 5

Otwórz plik page_header.php, ścieżka includes/page_header.php i odszukaj
"url_home" => $site_sess->url(ROOT_PATH."index.php"),


i zaraz pod nim dodaj
"url_comments_all" => $site_sess->url(ROOT_PATH."comments_all.php"),
"lang_all_comments" => $lang['all_comments'],


Krok 6

Otwórz plik main.php, ścieżka /lang/polish/main.php i odszukaj (na samym końcu)
?>


Przed tym kodem dodaj
//-----------------------------------------------------
//--- [MOD]All Comments / Wszystkie komentarze -------------
//-----------------------------------------------------
$lang['all_comments'] = "Wszystkie komentarze";
$lang['variable_text'] = "Na tej stronie możesz przeczytać pozostałe komentarze.";
$lang['navigation'] = "Nawigacja strony :";
$lang['com_per_page'] = "Komentarzy na stronie :";
$lang['com'] = "Komentarz";
$lang['coms'] = "Komentarze";
$lang['for_image'] = "do zdjęcia :";
$lang['in_cat'] = "w kategorii :";
$lang['com_date'] = "wysłano dnia :";
$lang['com_by'] = "wysłany przez :";


Krok 7

Ostatnią czynnością jest dodanie linku do strony z wszystkimi komentarzami. Link możemy dodać w miejscu dogodnym dla naszego szablonu, np. menu. W szablonie standardowym możemy dodać do plików user_logininfo.html , user_loginform.html, ścieżka /templates/twoj_szablon/user_logininfo.html i /templates/twoj_szablon/user_loginform.html
<a href="{url_comments_all}">{lang_all_comments}</a>


Krok 7

Możliwości ustawień
Poniższe ustawienia mogą być wykonane w pliku comments_all.php celem dostosowania szablonu do Twojej witryny
Komentarze na stronie: Standard = 10; zmiany poprzez - $commentperpage = 10;
Komentarze min na stronie: Standard = 1; zmiany poprzez - for($i = 1; $i <= 20;
Komentarze Max na stronie Standard = 20; zmiany poprzez - for($i = 1; $i <= 20;
Rozmiar miniaturki: Standard = 100% przez zmiany - $dimension = 100;

Ten obraz jest ukryty dla gości. Zaloguj się lub zarejestruj aby go zobaczyć.
Chciałbym zmienić świat, ale Bóg nie dał mi kodu źródłowego ...!
Ten obraz jest ukryty dla gości. Zaloguj się lub zarejestruj aby go zobaczyć.
Ostatnio zmieniany: 11 lata, 3 mies. temu przez andreoid.

Odp: MOD - Wszystkie komentarze 10 lata, 9 mies. temu #45

Witam, mam pytanie jak zmienić kolor czcionki napisu 8. Komentarz do zdjęcia : Kwiaty 2 [w kategorii: Kwiaty] z wyzej wymienionego wzoru
  • Strona:
  • 1
Wygenerowano w 0.69 sekundy

Najnowsze szablony

Great Docs and SupportBrak wiadomości

więcej...

Najnowsze modyfikacje

Native RTL SupportMOD - Komentarze użytkownika
Modyfikacja pozwala na wyświetlenie wszystkich komentarzy zredagowanych przez tego samego użytkownika. Link zainstalowany w profilu użytkownika, oraz w szablonach komentarzy wyświetlanych na stronach szczegółowych poszczególnych zdjęć pokaże wszystkie komentarze danego użytkownika.

więcej...