Modpack with bridge support: PM, avatar, watermark, cropped/ sharpened thumbs... - Page 20 Modpack with bridge support: PM, avatar, watermark, cropped/ sharpened thumbs... - Page 20
 

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

Main Menu

Modpack with bridge support: PM, avatar, watermark, cropped/ sharpened thumbs...

Started by Stramm, February 24, 2006, 01:34:35 PM

Previous topic - Next topic

0 Members and 7 Guests are viewing this topic.

docgonzo

Also, i do not find any of what is below in any theme.php file.
(i'm sorry for the 2nd post, but it seems i can't edit my previous post.)

Quote from: Stramm on March 03, 2006, 08:44:29 AM
copy over the function theme_display_film_strip from themes/sample/theme.php to the theme.php you're using
find in that theme....
    foreach($thumb_list as $thumb) {
        $i++;

and below add
if ($CONFIG['enable_mini_thumbs']){
        $thumb['image']=preg_replace('/'.$CONFIG['thumb_pfx'].'/',$CONFIG['mini_pfx'],$thumb['image']);
        $thumb['image']=preg_replace('/height="[^"]*"/','height="'.$CONFIG['mini_thumb_height'].'"',$thumb['image']);
        $thumb['image']=preg_replace('/width="[^"]*"/','width="'.$CONFIG['mini_thumb_width'].'"',$thumb['image']);
}


ymca

It works thnx.

but its ok just for new users, how do i reset the old users like admin...?
(the pictures that the notify write - cannot be deletet is deleted but the warning is wrong)

Quote from: Stramm on June 19, 2006, 09:56:16 PM
my bad
in delete.php find
//$query = "DELETE FROM {$CONFIG['TABLE_NOTIFY']} WHERE picture_id='$pid'";
    //$result = db_query($query);

and replace with
$query = "DELETE FROM {$CONFIG['TABLE_NOTIFY']} WHERE picture_id='$pid'";
    $result = cpg_db_query($query);


the pics that are still in the notify table and didn't get wiped out need to be removed manually

ymca

i cannot find how to translate users language... ???
where can i get the "stuff" for translating it for other user languages?
is there a file that i take the stuff from it & translate it?
QuoteEverything can be switched on and off in admin, you'll need to use the english language to make changes in config (or you translate stuff and add it to your language file)

Justttt

hey i was woundering if the avatar what shows in posted comments, profile. i would like it to be shown on another page beacause i would like to create a userpanel. and at the top would like the user to see the avatar and link under it saying "change avatar"
can anybody help me please?

thanks , justttt
J U S T T T T

Stramm

Quote from: docgonzo on June 19, 2006, 10:57:52 PM
Hi there, i know it's a bit late, but i cannot seem to find the sample theme that is referred to in the answer to your post.
Could you please share how you solved it?
I'd like to use minithumbs in my theme too.

have you read that post??
http://forum.coppermine-gallery.net/index.php?topic=28367.msg132651#msg132651

Stramm

Quote from: ymca on June 20, 2006, 11:52:46 AM
It works thnx.

but its ok just for new users, how do i reset the old users like admin...?
(the pictures that the notify write - cannot be deletet is deleted but the warning is wrong)


you'll have to browse the table with a tool like phpmyadmin and manually delete all entries where you've deleted the pics

Stramm

Quote from: ymca on June 20, 2006, 12:41:13 PM
i cannot find how to translate users language... ???
where can i get the "stuff" for translating it for other user languages?
is there a file that i take the stuff from it & translate it?

basically you use a program like winmerge. That program can compare files and shows differences. Compare the original english.php with the modpack english.php. The differences you copy to the lang file you want to edit and translate them.

Stramm

Quote from: Justttt on June 22, 2006, 01:19:53 PM
hey i was woundering if the avatar what shows in posted comments, profile. i would like it to be shown on another page beacause i would like to create a userpanel. and at the top would like the user to see the avatar and link under it saying "change avatar"
can anybody help me please?

thanks , justttt

avatar path and name are stored for the logged in user in a named constant. You just need to include init.inc.php and then can call the avatar image with AVATAR_PATH.AVATAR_URL

if it's not the logged in user who's avatar you want to display you need to grab the file name of his avatar
$user_data = $cpg_udb->get_user_infos($uid);
$avatar_url = $user_data['avatar_url'];
if ($avatar_url !="") $avatar_url = "<img src='".AVATAR_PATH.$avatar_url."' class=\"image\">";


where $uid is that users id

justbishop

Ok, I think I need help.  I've upgraded to 1.4.8 from 1.4.6, and installed this modpack (which has awesome features, btw), and am getting this error any time I click on a thumbnail (i.e go to displayimage.php):

Fatal error: Call to undefined function: get_comments() in /home/*****/public_html/jax/portfolio/include/themes.inc.php on line 2432

I've tried reuploading themes.inc.php, as well as displayimage.php, and I've run update.php several times (and it keeps finding more stuff to do).  Any ideas?


Stramm

please reupload all files. get_comments is defined in udb_base.inc.php
But if that's missing there's a high possibility more got lost while uploading. Also interesting would be if you use a bridged coppermine

justbishop

Hmmm...ok, reuploading everything in the mod pack from the bridge folder worked.  I'm no longer getting the error, thanks!  But...I've set it so that both resized and original images should be watermarked, and I'm not seeing anything.

ymca

Ok...

can i put the translated stuff at the end of my file altogether?
Quote from: Stramm on June 22, 2006, 07:08:54 PM
basically you use a program like winmerge. That program can compare files and shows differences. Compare the original english.php with the modpack english.php. The differences you copy to the lang file you want to edit and translate them.

ymca

my knowledge in phpmysql is not so good.
i do not know what to look for & where in the database  :-\
Quote from: Stramm on June 22, 2006, 07:06:52 PM
you'll have to browse the table with a tool like phpmyadmin and manually delete all entries where you've deleted the pics

Vargha

Hi Stramm
you know with your mod
when i go to my theme.php
to add somelines so users cant edit their comments
the function 'Send PM' will disappear, i dont know what to do

this is the lines that i add into my theme.php to disable comment edit

EOT;
// 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="0px" cellspacing="0px">
                           <tr>
                                <td class="tableh2_compact" nowrap="nowrap">
                                        <b>{MSG_AUTHOR}</b><a name="comment{MSG_ID}">&nbsp;</a>
<!-- 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="16px" height="16px" border="0px" align="middle" alt="{REPORT_COMMENT_TITLE}" /></a>
<!-- END report_comment_button -->


<!-- BEGIN buttons -->
EOT;
if (GALLERY_ADMIN_MODE) {
$template_image_comments .= <<<EOT
                                        <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="0px" align="middle" alt="" /></a>
                                        <a href="delete.php?msg_id={MSG_ID}&amp;what=comment"  onclick="return confirm('{CONFIRM_DELETE}');"><img src="images/delete.gif" border="0px" align="middle" /></a>
EOT;
}
$template_image_comments .= <<< EOT
<!-- 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 -->
                                <form name="f{MSG_ID}" method="post" action="db_input.php">
                                    <table width="100%" cellpadding="0px" cellspacing="0px">
                                        <tr>
                                            <td valign="top">
                                                <input type="text" name="msg_author" value="{MSG_AUTHOR}" class="textinput" size="25" />
                                                <input type="hidden" name="event" value="comment_update" />
                                                <input type="hidden" name="msg_id" value="{MSG_ID}" />
                                            </td>
                                            <td width="70%">
                                                <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:99%;">{MSG_BODY_RAW}</textarea>
                                            </td>
                                            <td align="right">
                                                <input type="submit" class="comment_button" name="submit" value="{OK}" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <img src="images/spacer.gif" width="1px" height="2px" />
                                                <br />
                                            </td>
                                        </tr>
                                    </table>
                                </form>
                                {SMILIES}
<!-- END edit_box_smilies -->
<!-- BEGIN edit_box_no_smilies -->
                                <form name="f{MSG_ID}" method="post" action="db_input.php">
                                    <table width="100%" cellpadding="0px" cellspacing="0px">
                                        <tr>
                                            <td valign="top">
                                                <input type="hidden" name="event" value="comment_update" />
                                                <input type="hidden" name="msg_id" value="{MSG_ID}" />
                                                <input type="text" name="msg_author" value="{MSG_AUTHOR}" class="textinput" size="25" />
                                            </td>
                                            <td width="70%">
                                                <textarea cols="40" rows="2" class="textinput" name="msg_body" style="width:99%;">{MSG_BODY_RAW}</textarea>
                                            </td>
                                            <td align="right">
                                                <input type="submit" class="comment_button" name="submit" value="{OK}" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <img src="images/spacer.gif" width="1px" height="2px" />
                                                <br />
                                            </td>
                                        </tr>
                                    </table>
                                </form>
<!-- END edit_box_no_smilies -->
                        </div>
                </td>
        </tr>
</table>
EOT;






Haalaa Boro Ye Chayi Vasam Dorost Kon Ta Man Ye Fekri Be Halet Bokonam ;) Ye Hendooneye Shotoriham Biyar Bizahmat :)
Visit My Site www.Rangarang.co.nr
Check Out My Gallery
www.Rangarang.co.nr/buddies
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg157.imageshack.us%2Fimg157%2F838%2Frangarang4xn.jpg&hash=48b4c3087515cafe09fc6d3f7ee19dce86328d8e)

Stramm

Quote from: justbishop on June 22, 2006, 10:40:20 PM
But...I've set it so that both resized and original images should be watermarked, and I'm not seeing anything.

use http upload and see if that works
have you enabled watermarking
does a watermark file exist on your server, is the path set correctly
eventually you need to change permissions
a watermark only gets applied for new files (files that get uploaded after you enabled watermarking). As mentioned several times you'll need to run the admin tools to watermark 'old' pics

Stramm

Quote from: ymca on June 22, 2006, 11:31:59 PM
Ok...

can i put the translated stuff at the end of my file altogether?

new additions... yes
I don't recommend it where original coppermine stuff has been changed

ymca

I don't know if it's here but i have found that if i use the resize option it shows it like this:

i upload a 300kb picture & the system resize it to 30kb but in the info about the pic it shows that the pic is 300kb & when i save it it's 30kb

Stramm

Quote from: ymca on June 22, 2006, 11:49:13 PM
my knowledge in phpmysql is not so good.
i do not know what to look for & where in the database  :-\

it's difficult cause the pics already have been deleted and you don't know the ids of them. So best would be to empty the notify table (only empty that table and don't delete it). All notifications would be gone afterwards and your users would have to subscribe again

Of course you could write a lil proggy that checks if a notifiocation pid is existing in the pictures table and if not deletes that entry

Stramm

Quote from: ymca on June 23, 2006, 09:06:36 AM
I don't know if it's here but i have found that if i use the resize option it shows it like this:

i upload a 300kb picture & the system resize it to 30kb but in the info about the pic it shows that the pic is 300kb & when i save it it's 30kb

the original still has that size (that file that got uploaded and exists as backup on the server). The watermarked image gets processed by either GD2 or ImageMagick and therefore gets recompressed. Check the orig file and you'll see

Justttt

Quote from: Stramm on June 22, 2006, 07:16:29 PM
avatar path and name are stored for the logged in user in a named constant. You just need to include init.inc.php and then can call the avatar image with AVATAR_PATH.AVATAR_URL

if it's not the logged in user who's avatar you want to display you need to grab the file name of his avatar
$user_data = $cpg_udb->get_user_infos($uid);
$avatar_url = $user_data['avatar_url'];
if ($avatar_url !="") $avatar_url = "<img src='".AVATAR_PATH.$avatar_url."' class=\"image\">";


where $uid is that users id


hi stramm,
when i do what you say it says error at the top of the page :S

<?
define('IN_COPPERMINE', true);
include('include/init.inc.php');
pageheader('User Panel');

echo '<table width="100%"><tr><td width="50%">';
starttable("100%", "Avatar",2);

$user_data = $cpg_udb->get_user_infos($uid);
$avatar_url = $user_data['avatar_url'];
if ($avatar_url !="") $avatar_url = "<img src='".AVATAR_PATH.$avatar_url."' class=\"image\">";

endtable();



pagefooter();

?>


can you help please
J U S T T T T