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: [Solved]: no avatar showing, need help with code  (Read 3653 times)

0 Members and 1 Guest are viewing this topic.

celeritycat

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
[Solved]: no avatar showing, need help with code
« on: July 10, 2008, 08:51:39 pm »

I am running the current stable Coppermine with no bridge! I sort a hand wrote this theme, but when it comes to the avatars displaying with comments I cant get the code right, I end up screwing everything up. I basically just want to add the code for avatar with the class "cavatar" so i can add to my stylesheet.

Code: [Select]
// HTML template for the display of comments
if (!isset($template_image_comments))  //{THEMES}
$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="themes/VP_default/images/report_small.gif"  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="themes/VP_default/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="themes/VP_default/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>
                                                        <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="themes/VP_default/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="themes/VP_default/images/spacer.gif" width="1" height="2" /><br /></td>
                                        </tr>
                                </table>
<!-- END edit_box_no_smilies -->
                        </div>
                </td>
        </tr>
</table>


EOT;

// HTML template for the form to add comments
if (!isset($template_add_your_comment))  //{THEMES}
$template_add_your_comment = <<<EOT
      <form method="post" name="post" action="db_input.php">

<table align="center" width="{WIDTH}" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" width="35"><div align="center"><img src="/gallery/themes/VP_default/images/callout.gif" alt="" width="28" height="26" border="0"></div></td>
    <td width="100%" align="left" nowrap="nowrap">&nbsp;<b>{ADD_YOUR_COMMENT}</b></td>
    <td width="120" align="right">&nbsp;</td>
  </tr>
</table>

                <table align="center" width="{WIDTH}" cellspacing="1" cellpadding="0" class="maintable">
                        <tr>
                <td colspan="1">
                        <table width="100%" cellpadding="0" cellspacing="0">

<!-- BEGIN user_name_input -->
                                                        <tr>
                                                                <td class="tableb_compact">
                                        {NAME}
                                </td>
                                <td class="tableb_compact">
                                        <input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="{USER_NAME}" />
                                </td>
<!-- END user_name_input -->
<!-- BEGIN input_box_smilies -->
                                <td class="tableb_compact">
                                {COMMENT}
                                                          </td>
                                <td width="100%" class="tableb_compact">
                                  <textarea name="msg_body" rows="3" class="textinput" id="message" style="width: 100%;" onSelect="storeCaret_post(this);" onClick="storeCaret_post(this);" onKeyUp="storeCaret_post(this);"></textarea>
                                                          </td>
<!-- END input_box_smilies -->
<!-- BEGIN input_box_no_smilies -->
                                <td class="tableb_compact">
                                {COMMENT}
                                                          </td>
                                <td width="100%" class="tableb_compact">
                                  <textarea name="msg_body" rows="3" class="textinput" id="message" style="width: 100%;"></textarea>
                                </td>
<!-- END input_box_no_smilies -->
                                <td class="tableb_compact">
                                  <div align="center">
                                  <input type="hidden" name="event" value="comment" />
                                  <input type="hidden" name="pid" value="{PIC_ID}" />
                                  <input type="submit" class="comment_button" name="submit" value="{OK}" />
                                  </div></td>
                                                        </tr>
                  </table>
                </td>
        </tr>
<!-- BEGIN smilies -->
        <tr>
                <td width="100%" class="tableb_compact">
                        {SMILIES}
                </td>
        </tr>
<!-- END smilies -->
                </table>

</form>
EOT;

if (!function_exists('theme_slideshow')) {  //{THEMES}
function theme_slideshow()
{
    global $CONFIG, $lang_display_image_php, $template_display_media;

    pageheader($lang_display_image_php['slideshow']);

    include "include/slideshow.inc.php";

    $start_slideshow = '<script language="JavaScript" type="text/JavaScript">runSlideShow()</script>';
    template_extract_block($template_display_media, 'img_desc', $start_slideshow);

    $params = array('{CELL_HEIGHT}' => $CONFIG['picture_width'] + 100,
        '{IMAGE}' => '<img src="' . $start_img . '" name="SlideShow" class="image" /><br />',
        '{ADMIN_MENU}' => '',
        );

    starttable();
    echo <<<EOT

        <tr>
                <td class="catrow" align="left" colspan="6">

<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" width="35">&nbsp;</td>
    <td width="100%" align="left" nowrap="nowrap">&nbsp;</td>
    <td width="120" align="right">&nbsp;</td>
  </tr>
</table>

                </td>
        </tr>

        <tr>
                <td align="center" class="navmenu" style="white-space: nowrap;">
                        <a href="javascript:endSlideShow()" class="navmenu">{$lang_display_image_php['stop_slideshow']}</a>
                </td>
        </tr>

EOT;

    echo template_eval($template_display_media, $params);
    endtable();
    pagefooter();
}
}  //{THEMES}

?>
« Last Edit: July 17, 2008, 08:31:25 pm by Stramm »
Logged

celeritycat

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: no avatar showing, need help with code
« Reply #1 on: July 10, 2008, 11:06:44 pm »

I got it! I just needed to add the avatar right before message body
Code: [Select]
<div id="cbody{MSG_ID}" style="display:block">
                               {AVATAR} {MSG_BODY}
                        </div>
Yeah!!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.071 seconds with 19 queries.