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 2 [3] 4   Go Down

Author Topic: signature code like mine...  (Read 66983 times)

0 Members and 1 Guest are viewing this topic.

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: signature code like mine...
« Reply #40 on: February 01, 2006, 09:37:36 am »

If Abbas has it working, can we see your sig now please Rush?
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

Rush_To_Me

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 17
  • Crazy Mechanic Engineer
    • Enlaces Digitales
Re: signature code like mine...
« Reply #41 on: February 01, 2006, 07:27:16 pm »

THANKS A LOT!!!  ;D You  guys surely are awsome so here it goes:

http://www.enlaces-digitales.com/gallery/pic.php

@Deus Thank you for the script!
@TranzNDance Thank you for your comments
@Abbas Ali I don't have enough words to repay the favor

I will study PHP a little more to help people like you guys ;)

One again Thank you for all

Manuel

dirtytricks

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: signature code like mine...
« Reply #42 on: February 23, 2006, 08:11:12 pm »

i configured the code to my liking but i cant seem to get the ".jpg" extension to work.

i have added in my .htaccess:
Code: [Select]
RewriteEngine on
RewriteRule ^([^/\&\?]*)pic\.jpg$ pic.php?$1
RewriteRule ^([^/\&\?]*)pic([0-9]*)\.jpg$ pic.php?alb=$2
RewriteRule ^([^/\&\?]*)pic([0-9]*)/([0-9]*)/(.*)\.jpg$ pic.php?alb=$2&txt=$4&q=$3
RewriteRule ^([^/\&\?]*)pic([0-9]*)/(.*)\.jpg$ pic.php?alb=$2&txt=$3

http://www.teamdirtytricks.net/drunktank/pic.php works just fine, but
http://www.teamdirtytricks.net/drunktank/pic.jpg produces a 404 error
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: signature code like mine...
« Reply #43 on: February 24, 2006, 06:06:29 am »

Make sure the mod_rewrite is allowed on your server. Ask your webhost for the same.
Logged
Chief Geek at Ranium Systems

dirtytricks

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: signature code like mine...
« Reply #44 on: February 25, 2006, 07:08:53 pm »

it is, they said:
Quote
ModRewrite is fully enabled in the server your account is on.
Unfortunatly we cannot provide technical assistance with creating
RewriteRule.

anyone got any ideas?
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: signature code like mine...
« Reply #45 on: May 23, 2006, 09:23:12 pm »

Morning,

Is there any security risk if i use only pic.php without .htaccess ?
Because it's work fine as standalone for me !
RewriteRule and mod_rewrite are not allowed on my host  ???

PYAP
« Last Edit: May 23, 2006, 09:40:43 pm by PYAP »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: signature code like mine...
« Reply #46 on: May 24, 2006, 08:10:51 am »

No security risk. You can use it like that. mod_rewrite is used only to make the urls look pretty.
Logged
Chief Geek at Ranium Systems

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: signature code like mine...
« Reply #47 on: May 24, 2006, 09:07:53 am »

Thanx Abbas  ;D
Look like that :
(http://) http://www.pays-dignois.com/galerie/random.php (oh oh... this link do not work on 11-30-2006  ??? )

PYAP
« Last Edit: November 30, 2006, 05:34:49 pm by PYAP »
Logged

peps

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
    • Photos of famous people
Re: signature code like mine...
« Reply #48 on: May 28, 2006, 09:08:15 pm »

awesome script there guys. I had almost no probs "installing" it. The thing is that I get an image only with pic.jpg, the other options don't work. I wonder what is wrong! I would like to configure pic1 to be in another resolution after all this is the point in having pic, pic1, ...pic#. Anyone that can help me out here.

here is the link to the pic file: http://paparak.info/pic.jpg

here is the code

Code: [Select]
<?php

define
('IN_COPPERMINE'true);
define('INDEX_PHP'true);

require(
'include/init.inc.php');
header('content-type: image/jpeg');

$mlink=mysql_connect('localhost','***''***');
mysql_select_db('***'$mlink);
$sum_x=4;
$pos=4;

if(isset($_GET['q'])) {
$q=$_GET['q'];
} else {
$q=5;
}

if(isset($_GET['alb'])) {
$pics=mysql_query("select filepath, filename from pictures where aid=".$_GET['alb']." and pwidth>0 order 

by rand() limit 0,
$q");
} else {
$pics=mysql_query("select filepath, filename from {$CONFIG['TABLE_PICTURES']}

{$CONFIG['TABLE_ALBUMS']} where {$CONFIG['TABLE_ALBUMS']}.aid={$CONFIG['TABLE_PICTURES']}.aid and pwidth>0 

and visibility=0 order by rand() limit 0,
$q");
}
if(isset($_GET['txt'])) {
$txt=$_GET['txt'];
} else {
$txt="http://paparak.info";
}


while($pr=mysql_fetch_array($pics)) {
$fname[]="albums/".$pr['filepath']."th_".$pr['filename'];
list($width$height$type$attr) = getimagesize("albums/".$pr['filepath']."th_".$pr['filename']);
$sum_x+=$width+4;
$ix[]=$width;
$im[]=imagecreatefromjpeg("albums/".$pr['filepath']."th_".$pr['filename']); //echo 

"albums/".$pr['filepath']."th_".$pr['filename']."--";
}

$im_total = @imagecreatetruecolor($sum_x100);
for($pn=0$pn<$q$pn++) {
imagecopy($im_total$im[$pn], $pos400$ix[$pn], 92);
$pos=$pos+$ix[$pn]+4;
}
$pos=$pos-$ix[$pn]-4;
//imagecopy($im_total, $im[1], $pos, 4, 0, 0, $ix[1], 100);
//$pos=$pos+$ix[1]+4;
//imagecopy($im_total, $im[2], $pos, 4, 0, 0, $ix[2], 100);

$textcolor imagecolorallocate($im_total255255255);
$last_x=max($pos,150);
imagefilledrectangle($im_total$last_x-15280$last_x+21270);
imagestring($im_total4$last_x-15280$txt$textcolor);
imagejpeg($im_total);

?>

Thanks in advance

younk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: signature code like mine...
« Reply #49 on: June 01, 2006, 01:04:57 pm »

I have tried this, but i wont work right.. It i prehaps just me who have forgot something.
http://www.babez.dk/galleri/pic.jpg

I hope you can help me.

Thanks in advange!
Logged

Dr Preacox

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 122
  • Is the Matrix...
    • Dynamic Creations
Re: signature code like mine...
« Reply #50 on: June 01, 2006, 03:18:19 pm »

This is a damn handy script!!!

Here's a copy of the script with all the needed changes in it, or at least all the ones that need to make it work on newer versions.

Code: [Select]
<?php

define
('IN_COPPERMINE'true);
define('INDEX_PHP'true);

require(
'include/init.inc.php');
header('content-type: image/jpeg');

$mlink=mysql_connect('localhost','dcclorvv_gallery''6iuni2fr');
mysql_select_db('your gallery database'$mlink);
$sum_x=4;
$pos=4;

if(isset($_GET['q'])) {
$q=$_GET['q'];
} else {
$q=3;
}

if(isset($_GET['alb'])) {
$pics=mysql_query("select filepath, filename from {$CONFIG['TABLE_PICTURES']} where aid=".$_GET['alb']." and pwidth>0 order by rand() limit 0,$q");
} else {
$pics=cpg_db_query("select filepath, filename from {$CONFIG['TABLE_PICTURES']}{$CONFIG['TABLE_ALBUMS']} where {$CONFIG['TABLE_ALBUMS']}.aid={$CONFIG['TABLE_PICTURES']}.aid and pwidth>0 and visibility=0 order by rand() limit 0,$q");
}
if(isset($_GET['txt'])) {
$txt=$_GET['txt'];
} else {
$txt="www.dc-6.com/gallery/";
}


while($pr=mysql_fetch_array($pics)) {
$fname[]="albums/".$pr['filepath']."thumb_".$pr['filename'];
list($width$height$type$attr) = getimagesize("albums/".$pr['filepath']."thumb_".$pr['filename']);
$sum_x+=$width+4;
$ix[]=$width;
$im[]=imagecreatefromjpeg("albums/".$pr['filepath']."thumb_".$pr['filename']); //echo "albums/".$pr['filepath']."thumb_".$pr['filename']."--";
}

$im_total = @imagecreatetruecolor($sum_x128);
for($pn=0$pn<$q$pn++) {
imagecopy($im_total$im[$pn], $pos400$ix[$pn], 120);
$pos=$pos+$ix[$pn]+4;
}
$pos=$pos-$ix[$pn]-4;
//imagecopy($im_total, $im[1], $pos, 4, 0, 0, $ix[1], 120);
//$pos=$pos+$ix[1]+4;
//imagecopy($im_total, $im[2], $pos, 4, 0, 0, $ix[2], 120);

$textcolor imagecolorallocate($im_total255255255);
$last_x=max($pos,168);
imagefilledrectangle($im_total$last_x-168111$last_x+21260);
imagestring($im_total4$last_x-166111$txt$textcolor);
imagejpeg($im_total);

?>


.htaccess
Code: [Select]
RewriteEngine on

RewriteRule ^([^/\&\?]*)pic\.jpg$ pic.php?$1
RewriteRule ^([^/\&\?]*)pic([0-9]*)\.jpg$ pic.php?alb=$2
RewriteRule ^([^/\&\?]*)pic([0-9]*)/([0-9]*)/(.*)\.jpg$ pic.php?alb=$2&txt=$4&q=$3
RewriteRule ^([^/\&\?]*)pic([0-9]*)/(.*)\.jpg$ pic.php?alb=$2&txt=$3
Logged
My Mods:
Making Memberlist Public - VIEW
Different Way of Displaying Categories - VIEW
Coming Soon - Automated Sub Domains -MOD

Lordi

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: signature code like mine...
« Reply #51 on: June 11, 2006, 01:33:43 pm »

Tnx it works great.

klax

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • Laura & Luis gallery
Re: signature code like mine...
« Reply #52 on: November 30, 2006, 04:56:32 pm »

madhatt

  • Coppermine novice
  • *
  • Country: 00
  • Offline Offline
  • Posts: 20
Re: signature code like mine...
« Reply #53 on: July 27, 2007, 07:38:33 pm »

Here is mine.

Still testing

(http://www.madhatt.com/gallery/pic.php)
Logged

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: signature code like mine...
« Reply #54 on: December 08, 2008, 07:27:12 pm »

Digging up an old thread.

Is there a way of this code being slightly modified to show just one image from a gallery of the users choice?
ie, I'd like to show a full size signature image, without text, and just the one image?
But it does need to work alongside the same code.
does this make sense?

Thanks in advance,
Darron.
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: signature code like mine...
« Reply #55 on: February 05, 2009, 01:59:49 am »

I am wondering if anyone fancies commenting in the script.
I've just had an hour of fun randomly changing numbers to get it to work correctly.
I have NO clue of whats what and would love to know what to change to fix things in future.
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: signature code like mine...
« Reply #56 on: March 30, 2009, 10:55:08 am »

updated URLs, all out of date and broken.
Now they're all ok.
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: signature code like mine...
« Reply #57 on: March 30, 2009, 07:49:55 pm »

Logged

kpfan

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: signature code like mine...
« Reply #58 on: January 26, 2011, 11:00:34 pm »

Where do I edit my template. I don't know what option in the admin controls to chose. To allow me to add my stat code to the footer.
Logged

Deus

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 153
    • DJ-Daz
Re: signature code like mine...
« Reply #59 on: August 25, 2014, 10:43:33 am »

it looks like the code isn't working, or at least for me, has anything changed in CPG 1.5.x for it to break the code?
http://cpg.mess-hall.co.uk/pic45.jpg
Logged
https://daz-stuff.uk
DJ tutorials, E-Bikes, Movies and videogames.
(https://daz-stuff.uk/daz/signature.png)
Pages: 1 2 [3] 4   Go Up
 

Page created in 0.028 seconds with 19 queries.