Mod Pack: Watermark, better thumbs, avatar, buddy, PM, notification - Page 3 Mod Pack: Watermark, better thumbs, avatar, buddy, PM, notification - Page 3
 

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

Mod Pack: Watermark, better thumbs, avatar, buddy, PM, notification

Started by Stramm, November 29, 2005, 05:05:42 PM

Previous topic - Next topic

0 Members and 9 Guests are viewing this topic.

Stramm

Quote from: sigepjedi on December 01, 2005, 11:17:21 PM
also, is it possible for the watermarking to bypass .gif files?

This would allow for animated gif to still work

in picmgmnt.inc.php find in function resize_image
    if ($imginfo[2] != GIS_JPG && $imageinfo[2] != GIS_PNG && $CONFIG['GIF_support'] == 0) {
        $ERROR = $lang_errors['gd_file_type_err'];
        return false;
    }


below add
    if ($imginfo[2] == GIS_GIF) { $watermark="false"; }

Stramm

Quote from: ganeshcp on December 01, 2005, 02:15:04 PM
i did that and it seems to work fine. :)
a suggestion wud be to improve the interface of the pms and buddy interface...it doesn't seem very user friendly

what are your suggestions... now the user can see all what's in his 'box'. He selects all items he'd like to change. Then from a dropdown he just choses the change that should be applied to the items.... hit go and done

Of course it's possible to change the user interface... if you come up with a better one I'd be more than happy to have a look at it. Still I like the existing one ;)

celeritycat

Quote from: Stramm on December 02, 2005, 05:36:56 AM
Well, how should I see from the debug if you added all the SQL with the correct prefix given in post one in this thread? Start up phpmyadmin and have a look

Well I keep getting the same error...

QuoteWhile executing query "SELECT id, buddy_ok, buddy_block, buddy_id, since, u.avatar_url, u.user_name as buddy_name, o.user_ip FROM cpg_buddy as b LEFT JOIN  cpg_users as u on b.buddy_id=u.user_id LEFT JOIN  as o on u.user_id=o.user_id WHERE buddy_ok='YES' AND b.user_id = 1 ORDER BY buddy_name ASC LIMIT 0, 25;" on 0

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as o on u.user_id=o.user_id WHERE buddy_ok='YES' AND b.user_id = 1 ORDER BY budd' at line 1

I looked in phpmyadmin and all the correct prefixes (cpg_...) are in place, a total of 25, but then I am not sure what errors I would even recognize "My Friends" link is the only one that shows and error, but I just don't know how to fix it. Should there be an cpg_avatar or am I missing something? What I have now is...albums, banned, bridge, buddy, buddy_req, categories, comments, config, dict, ecards, exif, favpics, filetypes, hit_stats, notify, online, pictures, plugins, pms, sessions, temp_data, usergroups, users, vote_stats, votes.
You'll have to forgive me I am php and SQL illiterate, though I am learning some!

celeritycat

Ok I started over and these are the errors I get from phpmyadmin. Also I am not sure if this is relevent, but when I browse the table cpg_config in phpmyadmin there is no row that refers to buddies and the tables cpg_buddy and cpg_buddy_req are both empty.

QuoteSQL query:
#buddy
INSERT INTO cpg_config( name, value )
VALUES (
'enable_buddy', '0'
);# Error
INSERT INTO cpg_config( name, value )
VALUES (
'enable_buddy_email', '1'
);# Error
INSERT INTO cpg_config( name, value )
VALUES (
'enable_buddy_private_view', '1'
);# Error
INSERT INTO cpg_config( name, value )
VALUES (
'buddy_enhanced_display', '1'
);# Error
ALTER TABLE cpg_users ADD enable_admin_email tinyint( 4 ) NOT NULL DEFAULT 1;# Error
CREATE TABLE `cpg_buddy_req` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`buddy_from` int( 11 ) NOT NULL default '',
`buddy_to` int( 11 ) NOT NULL default '',
`since` int( 11 ) NOT NULL default '',
PRIMARY KEY ( `id` )
) TYPE = MYISAM ;# MySQL returned an empty result set (i.e. zero rows).
CREATE TABLE `cpg_buddy` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`user_id` int( 11 ) NOT NULL default '',
`buddy_id` int( 11 ) NOT NULL default '',
`buddy_ok` enum( 'YES', 'NO' ) NOT NULL default 'NO',
`buddy_block` enum( 'YES', 'NO' ) NOT NULL default 'NO',
`since` int( 11 ) NOT NULL default '',
PRIMARY KEY ( `id` , `user_id` )
) TYPE = MYISAM ;# MySQL returned an empty result set (i.e. zero rows).

kegobeer

INSERT INTO cpg_config (name, value) VALUES ('enable_buddy', '0');

Try that.  Spacing does matter.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

celeritycat

Quote from: kegobeer on December 03, 2005, 01:38:43 AM
INSERT INTO cpg_config (name, value) VALUES ('enable_buddy', '0');

Try that.  Spacing does matter.

Tried that too, but still get the same errors and I still get errors when I try to click on the My Friends link in my gallery!
When I tried deleting and starting over everyone of my errors says the same thing
Quote#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

celeritycat

Thanks for the help. I finally just gave up and created a new database and gallery. Some how something got seriously screwed up in my files. But there is very good news I applied the new mod and it works with my new install, YEAH! Now the real work begins to move over every picture, but at least it's working. Again thanks for the help and the mod is great!

Stramm

Quote from: celeritycat on December 03, 2005, 09:30:05 AM
Thanks for the help. I finally just gave up and created a new database and gallery. Some how something got seriously screwed up in my files. But there is very good news I applied the new mod and it works with my new install, YEAH! Now the real work begins to move over every picture, but at least it's working. Again thanks for the help and the mod is great!

ohh.. to late... that's you'd have had to do
ALTER TABLE cpg_users ADD avatar_url varchar(255) NOT NULL default '';
ALTER TABLE cpg_comments ADD avatar_url varchar(255) NOT NULL default '';


but I'm glad it finally's working for you

celeritycat

yes it's me again!
Other than seeing a few changes in some arrays, themes.inc.php looks like greek to me. From my understanding I am to make these changes in each templates theme, but I am so lost. Can you give me a rough walk through of what needs to be added or changed and where?

Stramm

Quote from: celeritycat on December 03, 2005, 11:48:46 AM
yes it's me again!
Other than seeing a few changes in some arrays, themes.inc.php looks like greek to me. From my understanding I am to make these changes in each templates theme, but I am so lost. Can you give me a rough walk through of what needs to be added or changed and where?

what theme are you using?

Stramm

had a quick look and from that I think only the hardwired theme.php needs a lil change. What has to be modified is the css and template.html. Also you need to check the new images. If you like them as they are.. then you copy them into the other themes image directories. However you can design different ones for each theme.

in the css there are these new entries...

.alt1, .alt1Active
{
background-color: #F8FAFC;
font-family: verdana, arial, helvetica, sans-serif;
}

.alt2, .alt2Active
{
background-color: #cacaca;
font-family: verdana, arial, helvetica, sans-serif;
}

.alt3
{
background-color: #ececec;
color: #000000;
}

.pms_send_a {
background: #EFEFEF ;
padding-top: 3px;
padding-right: 10px;
padding-bottom: 3px;
padding-left: 10px;
border: 1px inset;
}

.pms_send_b {
background: #cacaca;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
border: 1px inset;
}

.pms_legend
{
        margin: 10px;
}

.panel
{
background: #F8FAFC;
color: #000000;
padding: 10px;
border: 2px outset;
}

.panelsurround
{
background: #cacaca;
color: #000000;
}

.pms_linecolor1
{
background-color: #0E72A4;
font-size: 10px;
}
.pms_linecolor2
{
background-color: #71ACCA;
font-size: 10px;
}
.pms_linecolor3
{
background-color: #DEDEDE;
font-size: 10px;
}
.pms_linecolor4
{
background-color: white;
font-size: 10px;
}
.pms_linecolor5
{
background-color: #A6DAF5;
font-size: 10px;
}

.smallfont
{
font-size: 10px;
}



to template.html you need to add the tag for the loginform/ PM and buddy quick statistics
{LOGIN_FORM}

attached is the hardwired theme... rename to theme.php

celeritycat

Ok everything is running smoothly (Thank you Stramm) except when I click on private messages and then click to view any messages the entire page duplicates itsself at the bottom with the exception that it shows the inbox and I get an error at the very bottom that reads...

QuoteFatal error: [] operator not supported for strings in /www/t/thevp/htdocs/cpg142/pms.php on line 406

I tried logging in as a differentr user on a different PC and still the duplication, but no error. It doesn't matter which theme I am using. I tried searching the forms for that type of error, but nothing applies to the newest version.

Stramm

Quote from: celeritycat on December 05, 2005, 05:15:30 AM
Ok everything is running smoothly (Thank you Stramm) except when I click on private messages and then click to view any messages the entire page duplicates itsself at the bottom with the exception that it shows the inbox and I get an error at the very bottom that reads...

I tried logging in as a differentr user on a different PC and still the duplication, but no error. It doesn't matter which theme I am using. I tried searching the forms for that type of error, but nothing applies to the newest version.

I'm updating the zip

easyjava

If a keyword is on some pictures it display too some times on the keyword search page. How can i do if i want that it display only one time ?

(sorry for my bad englash)

pslawinski

I had some problems with the way that the send script added RE: on to the beginning of every reply indiscriminently.

Here's a fix for that:

Update: 12/6/05 17:38 GMT-6 Code rewritten to remove all RE: instances and replace with only one.

pms_send.php

Find:

// Add subject
$subject = "RE: " . stripslashes($message['subject']);


Replace With:

// Add subject
$mess = explode("RE: ", stripslashes($message['subject']));
$subject = "RE: " . $mess[count($mess) - 1];



There now there will only ever be one RE: in a subject line...

pslawinski

The personal message inbox has a problem where the incorrect total number of messages is displayed in in the tabs.  This can be corrected by following the steps below.

pms.php

Find:

$total= @mysql_num_rows($result);

if ($total>0) $tabs = create_tabs($total, $page, $total_pages, $tab_tmpl);


Replace With:

$total= @mysql_num_rows($result);

if ($tot_box[0]>0) $tabs = create_tabs($tot_box[0], $page, $total_pages, $tab_tmpl);

Stramm

easyjava, that's not related to the mod

pslawinski, thanks.. still the multiple Re: instances are intended behavior (same as with emails)

pslawinski

Quote from: Stramm on December 07, 2005, 08:56:22 AM
easyjava, that's not related to the mod

pslawinski, thanks.. still the multiple Re: instances are intended behavior (same as with emails)

Yeah, I guess this makes sense, but after a certian amount of replies the subject can be nothing but RE: RE: RE: RE: (...)

Anyways, I suppose I'm just used to Gmail where RE: is not even shown

pslawinski

Stramm:

The BBCode buttons you used in pms_send.php appear to only work in IE.

Do you have a fix for this?

MavricK

Hey Stramm, I'm using the Igames theme, I'm not sure which functions to edit to be able to use the PM system mod, i can't figure it out, what to put where.... a link to my gallery is www.thebeerrun.com/gallery