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 ... 16 17 18 19 [20] 21 22 23 24 ... 30   Go Down

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

0 Members and 1 Guest are viewing this topic.

docgonzo

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30

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.)

copy over the function theme_display_film_strip from themes/sample/theme.php to the theme.php you're using
find in that theme....
Code: [Select]
    foreach($thumb_list as $thumb) {
        $i++;
and below add
Code: [Select]
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']);
}
Logged

ymca

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

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)

my bad
in delete.php find
Code: [Select]
//$query = "DELETE FROM {$CONFIG['TABLE_NOTIFY']} WHERE picture_id='$pid'";
    //$result = db_query($query);
and replace with
Code: [Select]
$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
Logged

ymca

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

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?
Quote
Everything 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)
Logged

Justttt

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 170
    • Trippy-ILLusion.Co.Uk

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
Logged
J U S T T T T

Stramm

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

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

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

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

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

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

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

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
Code: [Select]
$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

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 20
    • a-pathetic.net/ashley

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):

Code: [Select]
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?

Logged

Stramm

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

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

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 20
    • a-pathetic.net/ashley

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.
Logged

ymca

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

Ok...

can i put the translated stuff at the end of my file altogether?
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.
Logged

ymca

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

my knowledge in phpmysql is not so good.
i do not know what to look for & where in the database  :-\
you'll have to browse the table with a tool like phpmyadmin and manually delete all entries where you've deleted the pics
Logged

Vargha

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 223
  • Persian Soldier
    • Rangarang

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

Code: [Select]
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;






Logged
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
(http://img157.imageshack.us/img157/838/rangarang4xn.jpg)

Stramm

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

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

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

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

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

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
Logged

Stramm

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

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

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

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

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 170
    • Trippy-ILLusion.Co.Uk

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
Code: [Select]
$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

 
Code: [Select]
<?
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
Logged
J U S T T T T
Pages: 1 ... 16 17 18 19 [20] 21 22 23 24 ... 30   Go Up
 

Page created in 0.056 seconds with 20 queries.