1
Mods & Plugins (Releases & Support) / Re: [Mod] Show user's commets from his profile
« on: September 11, 2005, 05:34:03 PM »
Weis keiner einen Rat was geändert werden muss
Liebe Grüße Sabrina
Liebe Grüße Sabrina
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Step 3.
Open /templates/<yourtemplate>/member_profile.html
Add this tag, whereever u want to display link for comments:
<A href="{url_show_user_comments}"> {lang_show_user_comments} </a>
Nuja, ein Link zu deiner Galerie oder zumindest die Angabe der Version und des Styles wären nun schon hilfreich, sagte ja, dass es so pauschal schwierig ist.
Mehr Infos, dann können wir sicher weiter helfen
Hi Sabrina,
poste mal Deinen geänderten Code con Zeile 1060 bis 1070.
Scheint ein Fehler wegen " oder ' zu sein-
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: template.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (Lizenz.txt) für weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (Licence.txt) for further information. *
* *
*************************************************************************/
if (!defined('ROOT_PATH')) {
die("Security violation");
}
class Template {
var $no_error = 0;
var $key_cache = array();
var $val_cache = array();
var $template_cache = array();
var $template_path;
var $template_extension = "html";
var $start = "{";
var $end = "}";
function Template($template_path = "") {
if (!@is_dir($template_path)) {
$this->error("Couldn't open Template-Pack ".$template_path, 1);
}
$this->template_path = $template_path;
}
function set_identifiers($start, $end){
$this->start = $start;
$this->end = $end;
}
function register_vars($var_name, $value = "") {
if (!is_array($var_name)) {
if (!empty($var_name)) {
$value = preg_replace(array('/\$([0-9])/', '/\\\\([0-9])/'), array('$\1', '\\1'), $value);
$this->key_cache[$var_name] = "/".$this->add_identifiers($var_name)."/";
$this->val_cache[$var_name] = $value;
}
}
else {
foreach ($var_name as $key => $val) {
if (!empty($key)) {
$val = preg_replace(array('/\$([0-9])/', '/\\\\([0-9])/'), array('$\1', '\\1'), $val);
$this->key_cache[$key] = "/".$this->add_identifiers($key)."/";
$this->val_cache[$key] = $val;
}
}
}
return;
}
function un_register_vars($var_list) {
$vars = explode(",", $var_list);
foreach ($vars as $key => $val) {
unset($this->key_cache[$val]);
unset($this->val_cache[$val]);
}
return;
}
function add_identifiers($var_name) {
return preg_quote($this->start.$var_name.$this->end);
}
function cache_templates($template_list) {
$template_list = explode(",", $template_list);
foreach ($template_list as $val) {
if (!isset($this->template_cache[$val])) {
$this->template_cache[$val] = $this->get_template($val);
}
}
}
function get_template($template) {
if (!isset($this->template_cache[$template])) {
$path = $this->template_path."/".$template.".".$this->template_extension;
$line = @implode("", @file($path));
if (empty($line)) {
$this->error("Couldn't open Template ".$path, 1);
}
$this->template_cache[$template] = $line;
}
return $this->template_cache[$template];
}
function replace_if($template) {
foreach ($this->key_cache as $key => $val) {
if (empty($this->val_cache[$key]) || $this->val_cache[$key] == REPLACE_EMPTY) {
$reg = "/".$this->start."if[ \t\r\n]+".$key.$this->end."(.*)".$this->start."endif[ \t\r\n]+".$key.$this->end."/siU";
$template = preg_replace($reg, "", $template);
}
}
return $template;
}
function parse_template($template_name) {
$template = $this->get_template($template_name);
$template = $this->replace_if ($template);
$template = preg_replace($this->key_cache, $this->val_cache, $template);
return $template;
}
function parse_array($array) {
foreach ($array as $key => $val) {
$array[$key] = (is_array($val)) ? $this->parse_array($val) : preg_replace($this->key_cache, $this->val_cache, $val);
}
return $array;
}
function print_template($template) {
$template = $this->clean_template($template);
if (EXEC_PHP_CODE) {
$code = $this->exec_php_code($template);
eval($code);
}
else {
$code = preg_replace("/<\[\?|%](php|=)+( \r\n)*(.*)[\?|%]>/siU", "", $template);
echo $code;
}
}
function exec_php_code($code) {
$code = str_replace('\\', '\\\\', $code);
$code = str_replace('\'', '\\\'', $code);
$new_lines = array();
$is_code = 0;
$lines = explode("\n", $code);
foreach ($lines as $line) {
//$line = trim($line);
if (preg_match('/<[\?|%](php|=)+/', $line, $regs)) {
$line = preg_replace('/<[\?|%](php|=)?/i', '', $line);
$line = ((!empty($regs[1]) && $regs[1] == "=") ? "echo " : "").$line;
$is_code = 1;
}
if ($is_code) {
$line = str_replace ('\\\'', '\'', $line);
$line = str_replace ('\\\\', '\\', $line);
if (preg_match('/[\?|%]>/', $line)) {
$line = preg_replace('/[\?|%]>/', '', $line);
$is_code = 0;
}
}
else {
$line = 'echo \''.$line.'\'."\\n";';
}
$new_lines[] = $line;
}
return implode("\n", $new_lines);
}
function clean_template($template) {
$search_array = array(
"/".$this->start."[^ \t\r\n".$this->end."]+".$this->end."/",
"/".$this->start."if[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
"/".$this->start."endif[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
"/$([0-9])/",
"/\([0-9])/"
);
$replace_array = array(
"",
"",
"",
'$\1',
'\\\1'
);
$template = preg_replace($search_array, $replace_array, $template);
return $template;
}
function error($errmsg, $halt = 0) {
if (!$this->no_error) {
echo "<br /><font color='#FF0000'><b>Template Error</b></font>: ".$errmsg."<br />";
if ($halt) {
exit;
}
}
}
} // end of class
?>
So pauschal ist das idT nicht zu sagen. Und so einfach ist es auch, beispielhaft (Version 1.7) kann ich es mal aufzeigen:
Das setzt voraus, dass eine css-Klasse imagerow1hover angelegt wurde (kopiere die von imagerow1, setze es darunter, in imagerow1hover umbenennen und Farbe entsprechend ändern). Dateien vorher natürlich sicher, ist klar, ne
categories.php -> Anzeige bei ...categories.php?cat_id=XX
SUCHECode: [Select]$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
Ersetze mit
}
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";Code: [Select]$thumbnails .= "<tr>\n";
}
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\" class=\"imagerow".$row_bg_number."\" onmouseover=\"this.className='imagerow1hover'\" onmouseout=\"this.className='imagerow".$row_bg_number."'\">\n";
SUCHECode: [Select]$thumbnails .= "<td width=\"".$imgtable_width."\" >\n \n</td>\n";
Ersetze mitCode: [Select]$thumbnails .= "<td width=\"".$imgtable_width."\" class=\"imagerow".$row_bg_number."\" onmouseover=\"this.className='imagerow1hover'\" onmouseout=\"this.className='imagerow".$row_bg_number."'\">\n \n</td>\n";
index.php -> Für Startseite
SUCHECode: [Select]$new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
Ersetze mitCode: [Select]$new_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr><td class=\"imagerow1\" onmouseover=\"this.className='imagerow1hover'\" onmouseout=\"this.className='imagerow1'\">";
SUCHE FunktionCode: [Select]if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
Ersetze mitCode: [Select]if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_images .= "<tr>\n";
}
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\" class=\"imagerow".$row_bg_number."\" onmouseover=\"this.className='imagerow1hover'\" onmouseout=\"this.className='imagerow".$row_bg_number."'\">\n";
Bei mir hat es nun so geklappt
Viel Spaß
Parse error: parse error, unexpected T_STRING in /homepages/28/d36282853/htdocs/Galerie/includes/template.php(133) : eval()'d code on line 1063
<td align="center" class="thumb" onmouseover="this.className='thumb2'" onmouseout="this.className='thumb'">
Schau mal in den Quelltext :Code: [Select]<td align="center" class="thumb" onmouseover="this.className='thumb2'" onmouseout="this.className='thumb'">
Du musst 2 neue Klassen in CSS anlegen. In diesem Fall "thumb" und "thumb2".
Gruß,
Jo.
Hallo Jo
Wo und in welches HTML Template bitte muss ich das einsetzten ??Code: [Select]<td align="center" class="thumb" onmouseover="this.className='thumb2'" onmouseout="this.className='thumb'">
Danke
Liebe Grüße Sabrina
Hallo liebes Forum
Wie passe ich bitte dieses CSS so an das ich bei überfahren der Felder der Maus eine andere Farbe bekomme : :Code: [Select]/*--Images----------------------------------------------------*/
.imagerow1 {
background-color: #659FD4;
color: #000000;
}
.imagerow2 {
background-color: #A4C8E9;
color: #000000;
}
Hier ein Demo : http://www.7dana.com/4images/
Vielen Dank für eure Hilfe
Gr. Sabrina
/*--Images----------------------------------------------------*/
.imagerow1 {
background-color: #659FD4;
color: #000000;
}
.imagerow2 {
background-color: #A4C8E9;
color: #000000;
}
Also ich z.B. habe kein Problem mit .pdf Dateien
URL und Zugangsdaten wären schon mal ein Schritt näher um zu verstehen, was für ein Problem das ist
Hallo,
vielleicht läßt dein Hoster das nicht zu, frag mal den Support.
Gruß
michi-w.