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 ... 23 24 25 26 [27] 28 29 30   Go Down

Author Topic: Modpack with bridge support: PM, avatar, watermark, cropped/ sharpened thumbs...  (Read 1354572 times)

0 Members and 2 Guests are viewing this topic.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Thanks Stramm
but in your Hardwired modded theme is it possible?

of course it's possible... either modify the plugin I've posted recently (and add the PM button) or just copy/ past the template from oranje or tentacle theme.php (make sure you don't overwrite anything in your own theme.php)

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

of course it's possible... either modify the plugin I've posted recently (and add the PM button) or just copy/ past the template from oranje or tentacle theme.php (make sure you don't overwrite anything in your own theme.php)

Hi Stramm


I've copied & paste this code in theme.php (hardwired)

Code: [Select]
// HTML template for the image navigation bar



$template_img_navbar = <<<EOT

        <tr>
<td colspan="8" align="center">
<br />titolo:<strong>{PIC_TITLE}</strong> autore: <a href="profile.php?uid={OWNER_ID}"><strong>{OWNER_NAME}</strong></a>
EOT;

if ($CONFIG['pms_enabled']) {
$template_img_navbar .=  "<a href=\"".(PM_LINK)."{OWNER_ID}\"><img src=\"themes/hardwired/images/pm.gif\" width=\"16\" height=\"11\" border=\"0\" alt=\"Send PM\" /></a><br><br>";
}

When I'm logged all correctly work, but if I'm unlogged receive this withe error page  :(


Template error
Failed to find block 'ecard_button'(#(<!-- BEGIN ecard_button -->)(.*?)(<!-- END ecard_button -->)#s) in :

        <tr>
            <td colspan="8" align="center">
               <strong><br />{PIC_TITLE}</strong> from <a href="profile.php?uid={OWNER_ID}"><strong>{OWNER_NAME}</strong></a> <a href="pms_send.php?id={OWNER_ID}"><img src="themes/hardwired/images/pm.gif" width="16" height="11" border="0" alt="Send PM" /></a><br><br>

what I can make?  ???
Logged
a

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

that's not all... copy few lines more

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

that's not all... copy few lines more

OK Stramm

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 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.5
  $Source: /cvsroot/coppermine/stable/themes/hardwired/theme.php,v $
  $Revision: 1.19 $
  $Author: gaugau $
  $Date: 2006/03/02 08:25:18 $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has had redundant CORE items removed                           //
// ------------------------------------------------------------------------- //
define('THEME_HAS_RATING_GRAPHICS'1);
define('THEME_HAS_NAVBAR_GRAPHICS'1);
define('THEME_HAS_NO_SYS_MENU_BUTTONS'1);
define('THEME_HAS_NO_SUB_MENU_BUTTONS'1);
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 the image navigation bar

$template_img_navbar = <<<EOT

        <tr>
<td colspan="8" align="center">
<br />titolo:<strong>{PIC_TITLE}</strong> autore: <a href="profile.php?uid={OWNER_ID}"><strong>{OWNER_NAME}</strong></a> 
EOT;

if (
$CONFIG['pms_enabled']) {
$template_img_navbar .=  "<a href=\"".(PM_LINK)."{OWNER_ID}\"><img src=\"themes/hardwired/images/pm.gif\" width=\"16\" height=\"11\" border=\"0\" alt=\"Send PM\" /></a><br><br>";
}



// HTML template for sys menu

$template_sys_menu = <<<EOT

                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN home -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftmy" src="themes/hardwired/images/buttonleftmy.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{HOME_TGT}" title="{HOME_TITLE}">{HOME_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END home -->
<!-- BEGIN my_gallery -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftmy" src="themes/hardwired/images/buttonleftmy.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END my_gallery -->
<!-- BEGIN my_friends -->

TNX for any help!
Logged
a

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

what I meant was, that you haven't copied enough into your theme.php... not the entire template_img_navbar var

Code: [Select]
$template_img_navbar = <<<EOT

        <tr>
<td colspan="8" align="center">
<strong><br />{PIC_TITLE}</strong> from <a href="profile.php?uid={OWNER_ID}"><strong>{OWNER_NAME}</strong></a>
EOT;
if ($CONFIG['pms_enabled']) {
$template_img_navbar .=  "<a href=\"".(PM_LINK)."{OWNER_ID}\"><img src=\"themes/tentacle/images/pm.gif\" width=\"16\" height=\"11\" border=\"0\" alt=\"Send PM\" /></a>";
}

$template_img_navbar .= <<<EOT
<br><br></td>
</tr>
        <tr>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="{LOCATION}images/thumbnails.gif" align="middle" border="0" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="javascript:;" class="navmenu_pic" onclick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="{LOCATION}images/info.gif" border="0" align="middle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{SLIDESHOW_TGT}" class="navmenu_pic" title="{SLIDESHOW_TITLE}"><img src="{LOCATION}images/slideshow.gif" border="0" align="middle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
<!-- BEGIN report_file_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{REPORT_TGT}" class="navmenu_pic" title="{REPORT_TITLE}"><img src="{LOCATION}images/report.gif" border="0" align="middle" alt="{REPORT_TITLE}" /></a>
                </td>
<!-- END report_file_button -->
<!-- BEGIN ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{ECARD_TGT}" class="navmenu_pic" title="{ECARD_TITLE}"><img src="{LOCATION}images/ecard.gif"  border="0" align="middle" alt="{ECARD_TITLE}" /></a>
                </td>
<!-- END ecard_button -->
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="{LOCATION}images/prev.gif"  border="0" align="middle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="{LOCATION}images/next.gif"  border="0" align="middle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

EOT;


you'll need to adapt thge path to the PM image. And maybe think about modifying the plugin. I consider that to be the better solution

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

Hi stramm.
I appreciate a lot your job and your aid. This is my gallery (hardwired theme modded by Stramm) with the small modifications that I have make with your aid (see pic). Now I have nearly completed the Italian language translation.
 
Many thankses

angeldevil
Logged
a

Hythshade

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Hi,
I am wondering if it is possible to get this mod to work in coppermine bridged with Joomla? I really am just wondering if you could point me to which files need to be changed to have everything point to the Joomla db. Thanks for any help you can provide.
Logged

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

Hi Stramm, many TNX for all your helps!

Unfortunately I have some problems and new questions for you:

yesterday I've used watermarking feature and the intermediate image for the first time. I've changed value of PNG trasparency in admin tool (0 - 100) without some appreciable variation. The watermark.png image is always opaque in all new uploaded file. My server use GD 2.x

The last question is watermark not disactivable problem, EXIF data read problem and non-requested files compression:
 
After I've activated "watermark" and "create intermediate image" @ 800x600 pixels, my gallery doesn't read more the EXIF data from all new image uploaded, even if the "Read EXIF data in jpg" function is set @ "Yes".
At the same time, in all new original image files uploaded, cpg introduced a not requested compression @ 50% or more.
For example the original file size of xxx.jpg of the user yyy before post= 221,9 KBytes @ 1000x750 pixels. After post,in http://...gallery/albums/userpics/yyy/...  the size of the same file is: xxx.jpg = 94Kbytes @ 1000x750 pixels, normal_xxx.jpg = 55,4 Kbytes @ 800x600 pixels.
what happened?
 
When my users has reported this problems I've immediately set @ "NO" "Create a intermediate image" and "watermark" from admin panel, but I cannot disabled watermark anyway. Finally I've had renamed the watermark.png file in NOwatermark.png in order to stop the process. Finally I've stopped it but The EXIF data still not be read and all new uploaded image file are being compressed anyway!!

Can you help me please?




Other question:

I've a new idea for improve my small custom modifications (see at the top of this page 27) and/or your pic_poster plugin.
The real question is:
Is it possible to add, near uploader name, the user on/offline status, using a part of the function "Who is online" included in your very great modpack ?
I think that my suggestion can be a very useful feature.

See two attacched example pics. (in order: pic title, uploader name, status on/off, PM) see also comments box in "cmnts_box" pic attacched


TNX
Logged
a

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Quote
yesterday I've used watermarking feature and the intermediate image for the first time. I've changed value of PNG trasparency in admin tool (0 - 100) without some appreciable variation. The watermark.png image is always opaque in all new uploaded file. My server use GD 2.x

please read the docs

Quote
After I've activated "watermark" and "create intermediate image" @ 800x600 pixels, my gallery doesn't read more the EXIF data from all new image uploaded, even if the "Read EXIF data in jpg" function is set @ "Yes".

yes, I see, should be easy to fix. Instead of reading the exif from the watermarked file it needs to read it from the original backup

Quote
At the same time, in all new original image files uploaded, cpg introduced a not requested compression @ 50% or more.
For example the original file size of xxx.jpg of the user yyy before post= 221,9 KBytes @ 1000x750 pixels. After post,in http://...gallery/albums/userpics/yyy/...  the size of the same file is: xxx.jpg = 94Kbytes @ 1000x750 pixels, normal_xxx.jpg = 55,4 Kbytes @ 800x600 pixels.
that's how watermarking works. JJust try it with your favourite image editing software! How do you proceed? I bet you open the image in question, into a second layer you paste your watermark and then you save the picture. And that's exactly what the watermark mod's doing. With resaving there's compression (exactly the one you set in your coppermine config as qality for the thumbs and intermediate images)


Quote
When my users has reported this problems I've immediately set @ "NO" "Create a intermediate image" and "watermark" from admin panel, but I cannot disabled watermark anyway.

once watermarked the pictures are watermarked. To undo that you musn't have deleted the image backup files. Turn watermarking off in config and then recreate intermediate and fullsized pics in the admin tools. Please read the docs and the mod pack/ watermark mod threads. I've explained that numerous times already. After recreating the pics the exif should be readable again. In some free min I'll have a look and fix that.

Quote
s it possible to add, near uploader name, the user on/offline status, using a part of the function "Who is online" included in your very great modpack ?
I think that my suggestion can be a very useful feature.
It's possible and not that difficult to do cause it's already done for the profile and buddy list. Basically copy the code from there and make it usable where you need it. Within the comments I wouldn't do it. Either some table joins are necessary or a query for each comment. Performancewise not the best idea if you have a lot of comments

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

exif + iptc fix:
in displayimage.php find
Code: [Select]
    $path_to_pic = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];below add
Code: [Select]
if ($CONFIG['enable_watermark'] ) {
if (is_file($CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CONFIG['orig_pfx']. $CURRENT_PIC_DATA['filename'])) {
$path_to_pic = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CONFIG['orig_pfx']. $CURRENT_PIC_DATA['filename'];
}
}

haven't tested in detail but it should work quite well

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

Many TNX Stramm!

OK, I've set @ 90 instead 80 the quality for JPEG files and the extra-compression problem is solved!  ;)

I've tried your solution for EXIF data problem fix . I've add your code in displayimage.php but it fixed nothing. The rewriting and resaving system of gallery delete all EXIF data in the image file anyway.  I had the same problem in past, using the auto-resize image feature of cpg, but by disabling it, the exif data read function is turned OK

Now I can't stop the work of watermark process. I alredy turned off from the admin panel but the process continued to work. then I've also renamed the watermark.png file in order to phisically block the watermarker image writing process, but the relative function continues to work and rewriting and resave the image file  without watermarker image and this continued to deleting all exif data.  :(

How to fix it?

Hi
Logged
a

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Quote
I've tried your solution for EXIF data problem fix . I've add your code in displayimage.php but it fixed nothing. The rewriting and resaving system of gallery delete all EXIF data in the image file anyway.  I had the same problem in past, using the auto-resize image feature of cpg, but by disabling it, the exif data read function is turned OK

the code is written to only interfere if you have enabled watermarking... as already said. If you disabled it run the admin tools to undo the watermarks. This is expected behaviour. The exif is still avail in the backup files. Reread what I've written before and the modpack docs.
Just turning off the watermark in config doesn't 'unwatermark' the images. It's no watermarking on the fly... it's a permanent watermark function.
Enabling/ disabling only has an effect on newly uploaded pics. For images already in your db -> run the admin tools.

So there are now two possibilities...
1. Enable watermarking in config, run admin tools and recreate intermediate and fullsized pics, apply the code in my last post and you'll have your exif data
2. Disable watermarking in config, run admin tools and recreate intermediate and fullsized pics and you'll have your exif data

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

Quote
1. Enable watermarking in config, run admin tools and recreate intermediate and fullsized pics, apply the code in my last post and you'll have your exif data

Problem solved!!  ;D

Many, many tanks!
Logged
a

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

My old question:

Quote
is it possible to add, near uploader name, the user on/offline status, using a part of the function "Who is online" included in your very great modpack ?
I think that my suggestion can be a very useful feature.

Your answer:

Quote
It's possible and not that difficult to do cause it's already done for the profile and buddy list. Basically copy the code from there and make it usable where you need it.

Hi Stramm, I've tried your suggestion but the modification doesn't work. After I've tried some little variations in your code but it doesn't work. The result to db query is always zero (offline)

Have you any suggestion?

TNX

This is a my last tried (I've add it in theme.php):


Code: [Select]
$result_online = cpg_db_query("SELECT user_id FROM {$CONFIG['TABLE_PREFIX']}mod_online WHERE user_id =

'{OWNER_ID}'");
$user_data = mysql_num_rows($result_online);
mysql_free_result($result_online);
$template_img_navbar .= $user_data;
if ($user_data != 0) {
$online = "<span class=\"small_font\"> <img src=\"themes/hardwired/images/useron.gif\" alt=\"\"

border=\"0\" /></span>";
echo "";
} else {
$online = "<span class=\"small_font\"> <img src=\"themes/hardwired/images/useroff.gif\"

alt=\"\" border=\"0\" /> </span>";
}
$template_img_navbar .= $online;
Logged
a

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

hmmm...now, it seems to work...it, in a strange way, works... i changed if ($user_data != 0) in if ($user_data == 0) ... i can't figure out why that thing works...anyway...

TNX
Logged
a

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

Quote
hmmm...now, it seems to work...it, in a strange way, works... i changed if ($user_data != 0) in if ($user_data == 0) ... i can't figure out why that thing works...anyway...

TNX

oops! the status is casually "ON" or "OFF" without a logic reason  :o :(
Logged
a

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

this can't work... {OWNER_ID} is a placeholder and doesn't contain any data.
Haven't I mentioned that it might be better to write this as plugin? And haven't I directed you to the already published plugin (displaying the pic posters name above the intermediate image). It's really easy to add a PM link here (with a check if PM is enabled) and your online status (again with a check if Nibblers plugin is enabled). That plugin even a non modpack user can use and you won't have to mess around with your theme once you want to disable the PM feature/ onlinestats.

You install it like every other plugin. useron.gif, useroff.gif, pm.gif need to be in your themes images directory. If you use more themes, they need to be in every themes images directory -> customizable for each theme

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107

Quote
Haven't I mentioned that it might be better to write this as plugin?

I will try it

Many TNX
« Last Edit: July 19, 2006, 09:28:28 am by GauGau »
Logged
a

udgang99

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 78

Hey STRAMM ...

I like the "oranje"-theme, but I'd like to change the size of the font for the name of the albums... it's WAAAY too big. Where and how do I do that???
I have been looking around in template, style and theme, but I just can't find it... will you help me, please? :)

-Kim
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

Use the Web Developer Extension or similar to find out.
Logged
Pages: 1 ... 23 24 25 26 [27] 28 29 30   Go Up
 

Page created in 0.038 seconds with 20 queries.