Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Template für displayimage ändern?  (Read 5772 times)

0 Members and 1 Guest are viewing this topic.

Bull

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Template für displayimage ändern?
« on: August 20, 2007, 11:58:51 pm »

Hallo, ich versuche die ganze Zeit herauszufinden wie ich für die Seite displayimage.php die Templates ein wenig verändern kann, so dass die Box mit den Kommentaren rechts von dem anzuzeigendem Bild erscheint und nicht unter der Bewertung und unter den Bilderinformationen. Kann mir da jemand bei helfen?

MfG Bull
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Template für displayimage ändern?
« Reply #1 on: August 21, 2007, 08:40:59 am »

Bearbeite themes/dein_theme/theme.php, suche
Code: [Select]
// HTML template for the display of comments
$template_image_comments = <<<EOT
und bearbeite den Code dort. Wenn Du die beschreibene Code-Zeile nicht ein Deinem Theme hast, kopiere
Code: [Select]
// HTML template for the display of comments
$template_image_comments = <<<EOT
<table align="center" width="{WIDTH}" cellspacing="1" cellpadding="0" class="maintable">

        <tr>
                <td>
                        <table width="100%" cellpadding="0" cellspacing="0">
                           <tr>
                                <td class="tableh2_compact" nowrap="nowrap">
                                        <b>{MSG_AUTHOR}</b><a name="comment{MSG_ID}"></a>&nbsp;
<!-- BEGIN ipinfo -->
                                                                                 ({IP})
<!-- END ipinfo -->
</td>


                                <td class="tableh2_compact" align="right" width="100%">
<!-- BEGIN report_comment_button -->
     <a href="report_file.php?pid={PID}&amp;msg_id={MSG_ID}&amp;what=comment" title="{REPORT_COMMENT_TITLE}"><img src="images/report.gif" width="16" height="16" border="0" align="middle" alt="{REPORT_COMMENT_TITLE}" /></a>
<!-- END report_comment_button -->


<!-- BEGIN buttons -->
                                        <a href="javascript:;" onclick="blocking('cbody{MSG_ID}','', 'block'); blocking('cedit{MSG_ID}','', 'block'); return false;" title="{EDIT_TITLE}"><img src="images/edit.gif" border="0" align="middle" /></a>
                                        <a href="delete.php?msg_id={MSG_ID}&what=comment"  onclick="return confirm('{CONFIRM_DELETE}');"><img src="images/delete.gif" border="0" align="middle" /></a>
<!-- END buttons -->
                                </td>
                                <td class="tableh2_compact" align="right" nowrap="nowrap">
                                        <span class="comment_date">[{MSG_DATE}]</span>
                                </td></tr>
                        </table>
                </td>
        </tr>
        <tr>
                <td class="tableb_compact">
                        <div id="cbody{MSG_ID}" style="display:block">
                                {MSG_BODY}
                        </div>
                        <div id="cedit{MSG_ID}" style="display:none">
<!-- BEGIN edit_box_smilies -->
                                <table width="100%" cellpadding="0" cellspacing="0">

                                                <form name="f{MSG_ID}" method="POST" action="db_input.php">
                                                <input type="hidden" name="event" value="comment_update" />
                                                <input type="hidden" name="msg_id" value="{MSG_ID}" />
                                                <tr>
                                                <td>
                                                   <input type="text" name="msg_author" value="{MSG_AUTHOR}" class="textinput" size="25" />
                                                </td><td>
                                                </tr>
                                                <tr>
                                                <td width="80%">
                                                        <textarea cols="40" rows="2" class="textinput" name="msg_body" onselect="storeCaret_f{MSG_ID}(this);" onclick="storeCaret_f{MSG_ID}(this);" onkeyup="storeCaret_f{MSG_ID}(this);" style="width: 100%;">{MSG_BODY_RAW}</textarea>
                                                </td>
                                                <td class="tableb_compact">
                                                </td>
                                                <td>
                                                        <input type="submit" class="comment_button" name="submit" value="{OK}" />
                                                </td>
                                                </form>
                                        </tr>
                                        <tr>
                                                <td colspan="3"><img src="images/spacer.gif" width="1" height="2" /><br /></td>
                                        </tr>
                                </table>
                                {SMILIES}
<!-- END edit_box_smilies -->
<!-- BEGIN edit_box_no_smilies -->
                                <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                                <form name="f{MSG_ID}" method="POST" action="db_input.php">
                                                <input type="hidden" name="event" value="comment_update" />
                                                <input type="hidden" name="msg_id" value="{MSG_ID}" />
                                                <td>
                                                <input type="text" name="msg_author" value="{MSG_AUTHOR}" class="textinput" size="25" />
                                                </td>
                                        </tr>
                                        <tr>
                                                <td width="100%">
                                                        <textarea cols="40" rows="2" class="textinput" name="msg_body" style="width: 100%;">{MSG_BODY_RAW}</textarea>
                                                </td>
                                                <td class="tableb_compact">
                                                </td>
                                                <td>
                                                        <input type="submit" class="comment_button" name="submit" value="{OK}" />
                                                </td>
                                                </form>
                                        </tr>
                                        <tr>
                                                <td colspan="3"><img src="images/spacer.gif" width="1" height="2" /><br /></td>
                                        </tr>
                                </table>
<!-- END edit_box_no_smilies -->
                        </div>
                </td>
        </tr>
</table>
EOT;
aus themes/sample/theme.php in eine neue Zeile vor
Code: [Select]
?>der Datei themes/dein_theme/theme.php

Joachim
Logged

Bull

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Template für displayimage ändern?
« Reply #2 on: August 21, 2007, 09:01:05 pm »

Das verstehe ich jetzt nicht so ganz.

In der /theme/sample/theme.php sind nochmal die Befehle drinne die ich in der theme.inc.php gefunden habe. Und in der theme.inc.php habe ich zum Beispiel die Funktion mit dem Bildersortieren ausgeklammert und das kommt jetzt auch nicht mehr. Und wenn ich meine theme.php angucke ist da nur folgendes drinne:

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2007 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.12
  $Source$
  $Revision: 3636 $
  $Author: gaugau $
  $Date: 2007-06-29 11:35:30 +0200 (Fr, 29 Jun 2007) $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
                                           // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/Party-Kingdom/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';

?>


http://www.pk-server.de/V2/galerie/thumbnails.php?album=942
Logged

Bull

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Template für displayimage ändern?
« Reply #3 on: August 21, 2007, 11:25:30 pm »

OK, ich habe jetzt nochmal die theme.php aus der sample genommen und bei mir eingefügt und das ersetzt jetzt das ganze was ich in der theme.inc.php geändert habe. Aber jetzt bekomme ich es trotzdem nicht hin das die Kommentar Funktion komplett rechts von dem Bild zu sehen ist. Ich steige da einfach nicht durch
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Template für displayimage ändern?
« Reply #4 on: August 22, 2007, 11:14:45 am »

Lies doch noch mal meine Erklärungen durch und mache es dann genau so, wo ich es beschrieben habe.

include/themes.inc.php sollte unter keinen Umständen bearbeitet werden. Mache alle Änderungen dort rückgängig!

themes/sample/theme.php ist eine Kopiervorlage. Kopiere von dort den Bereich, den Du geändert haben möchtest (und nur den Teil) nach themes/dein_theme/theme.php (wie oben beschrieben), dann führe die Änderungen durch.

Für eine detailierte Beschreibung, lies doch mal http://documentation.coppermine-gallery.net/theme.htm#theme_sample und http://documentation.coppermine-gallery.net/theme_create.htm#theme_create (ist zwar auf Englisch und eigentlich für cpg1.5.x, aber das dort gesagt trifft weitestgehend auch auf cpg1.4.x zu).
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 19 queries.