Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3 4   Go Down

Author Topic: Gallery Block for my phpBB portal  (Read 91478 times)

0 Members and 1 Guest are viewing this topic.

DaMysterious

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • My CPG Recources
    • My CPG Recources
Gallery Block for my phpBB portal
« on: November 01, 2003, 06:11:29 pm »

On my phpBB portal I like to have a CPG-Gallery Block like on my nuked site. How to realise this. Something I tryed the last days does'nt work, also ssi.php wil not work for me when including any code from example.php into my portal.tpl. Problem seems to be the *.tpl from the phpBB templates. My phpBB and coppermine databases are locatet in different bases, I know that I have to call the CPG database first but have no idea as I'm not very good in programming php. Anyone a hint how to create/realise a new/random picblock on my phpBB frontpage?
« Last Edit: February 14, 2005, 06:42:38 am by GauGau »
Logged
DaMysterious.

Zarsky

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 268
    • Zerr Family Website
Gallery Block for my phpBB portal
« Reply #1 on: November 02, 2003, 12:42:22 am »

you could try this terribly written code I hacked up on the old board...I still use it and it works for me...

Original thread:
http://coppermine.sourceforge.net/oldboard/viewtopic.php?t=1106&highlight=random

my latest code:

Code: [Select]
<?php 

//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 

$copperminepath '/photo_album';  //***YOU MUST CHANGE THIS*** 

//This connects to the mysql DB 
//***change username and password below*** 

$MZrandompic = @mysql_connect('localhost''user''passwd'); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) { 
echo( 
'<p>Unable to connect to the ' 
'database server at this time.</p>' ); 
exit(); 


//select photo DB 
//***YOU MUST CHANGE THIS*** 

if (! @mysql_select_db('coppermine_database') ) {
die( 
'<p>Unable to locate the picture ' 
'database at this time.</p>' ); 


//This gets a random picture record from the database and 
//the picture's location and displays it 

$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY RAND() LIMIT 0,1"); 
if (!
$MZresult) { 
die(
'<p>Error performing query: ' mysql_error() . 
'</p>'); 


while ( 
$MZrow mysql_fetch_array($MZresult) ) { 

$albumid $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location

echo('<P ALIGN=center>'); 

echo(
'<a target = "_new" href="' $copperminepath '/displayimage.php?album=' $albumid 
'&pos=-' $pos '">'); //make thumbnail clickable 

echo('<IMG SRC="' $copperminepath '/albums/');           //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] .
     
'" alt=' $MZrow['filename'] . ' ''border=0>' '</a>'); //outputs path from /userspics 


//This displays the picture's album name and 
//links it to the coppermine album 

$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'"); 
if (!
$MZalbumresult) { 
die(
'<p>Error performing query: ' mysql_error() . 
'</p>'); 


while ( 
$MZalbumname mysql_fetch_array($MZalbumresult) ) { 
//echo('<FONT SIZE=2>'); 
echo('<P ALIGN=center>'); 

echo(
'<a href="' $copperminepath 
'/thumbnails.php?album=' $albumid '">' 
$MZalbumname['title'] . '</a>' '</p>'); 


if (! @
mysql_select_db('main_website_DB') ) { 
die( 
'<p>Unable to reload the main website ' 
'database at this time.</p>' ); 


?>
Logged
Read the Online DOCs, FAQ, and SEARCH the board BEFORE posting questions for help.

DaMysterious

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • My CPG Recources
    • My CPG Recources
Gallery Block for my phpBB portal
« Reply #2 on: November 02, 2003, 03:17:01 pm »

Quote from: "zarsky99"
you could try this terribly written code I hacked up on the old board...I still use it and it works for me...

Original thread:
http://coppermine.sourceforge.net/oldboard/viewtopic.php?t=1106&highlight=random

my latest code:



Cooooool it works. Thanks Zarsky99! Do you have any suggestion how to place the tumbs (I wil show 4-6) in a row? Now they are displayed in a culumn. Next question, how to filter out some specific groups (porn)?
Logged
DaMysterious.

Inertia

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://www.alucinae.com
Gallery Block for my phpBB portal
« Reply #3 on: November 09, 2003, 07:22:46 pm »

I have a really silly question - but I am struggling with this! It's exactly what I am looking for.

My forum - http://www.alucinae.com/dystopia (phpbb)

I don't use a portal, but I do have a side nav bar, where I really want to display the latest image.

I have tried ssi.php and couldn't get it to work. I thought I'd try this script, and on its own it works great. However, how do I place this script into the TPL file where my side nav is?

If you take a look at the site now - you'll see i have a section for "the galleries" - it is supposed to display the images there.

Any help would be great!

DaMysterious

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • My CPG Recources
    • My CPG Recources
Gallery Block for my phpBB portal
« Reply #4 on: November 09, 2003, 11:38:14 pm »

Quote from: "Inertia"
I have a really silly question - but I am struggling with this! It's exactly what I am looking for.

My forum - http://www.alucinae.com/dystopia (phpbb)

I don't use a portal, but I do have a side nav bar, where I really want to display the latest image.

I have tried ssi.php and couldn't get it to work. I thought I'd try this script, and on its own it works great. However, how do I place this script into the TPL file where my side nav is?

If you take a look at the site now - you'll see i have a section for "the galleries" - it is supposed to display the images there.

Any help would be great!



Ok here we go:

In your case create a file e.g 'gallery_side_random_block.php' in you coppermine dir, put the code below in it and change the path to your '/gallery' and correct the connection to your mySql database, further you could change the number of dispayed thumbs with 'LIMIT 0,4' on row 30 to the amount you like. Now there are random 4 thumbs vertically displayed.

Code: [Select]

<?php  

//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 

$copperminepath '/gallery';  //***YOU MUST CHANGE THIS*** 

//This connects to the mysql DB 
//***change username and password below*** 

$MZrandompic = @mysql_connect('localhost''root'''); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) {  
echo( 
'<p>Unable to connect to the ' .  
'database server at this time.</p>' );  
exit();  
}  

//select photo DB 
//***YOU MUST CHANGE THIS*** 

if (! @mysql_select_db('coppermine') ) { 
die( 
'<p>Unable to locate the picture ' .  
'database at this time.</p>' );  
}  

//This gets a random picture record from the database and 
//the picture's location and displays it 

$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY RAND() LIMIT 0,4");  
if (!
$MZresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZrow mysql_fetch_array($MZresult) ) {  

// $albumid = $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 

echo('<P ALIGN=center>');  

echo(
'<a target = "_new" href="' $copperminepath '/displayimage.php?album=' $albumid .  
'&pos=-' $pos '">'); //make thumbnail clickable 

echo('<IMG SRC="' $copperminepath '/albums/');           //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . 
     
'" alt=' $MZrow['filename'] . ' ''border=0 width=80 height=50>' '</a>'); //outputs path from /userspics 
}  

//This displays the picture's album name and 
//links it to the coppermine album 

$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'");  
if (!
$MZalbumresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZalbumname mysql_fetch_array($MZalbumresult) ) {  
echo(
'<FONT SIZE=1>'); 
echo(
'<P ALIGN=center>');  

echo(
'<a href="' $copperminepath .  
'/thumbnails.php?album=' $albumid '">' .  
$MZalbumname['title'] . '</a>' '</p>');  
}  

if (! @
mysql_select_db('coppermine') ) {  
die( 
'<p>Unable to reload the main website ' .  
'database at this time.</p>' );  
}  

?>



Go to your sidenav.tpl and add the code below to your table/block 'my gallery' section (change to he right path).

Code: [Select]

<?php include("/inetpub/coppermine/gallery_side_random_block.php");>


Note: Normally a php-call wil not run from any .tpl inside phpBB so you have to look for the 'eXtreme Styles mod' from Vjacheslav Trushkin

Have success.


For other codefreaks I change the code from zarsky99 to a set of different center-blocks to use within *.tpl they all display horizontally.

1) gallery_center_newest_block.php
Code: [Select]

<?php  

//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 

$copperminepath '/gallery';  //***YOU MUST CHANGE THIS*** 

//This connects to the mysql DB 
//***change username and password below*** 

$MZrandompic = @mysql_connect('localhost''root'''); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) {  
echo( 
'<p>Unable to connect to the ' .  
'database server at this time.</p>' );  
exit();  
}  

//select photo DB 
//***YOU MUST CHANGE THIS*** 

if (! @mysql_select_db('coppermine') ) { 
die( 
'<p>Unable to locate the picture ' .  
'database at this time.</p>' );  
}  

//This gets a random picture record from the database and 
//the picture's location and displays it 

$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY pid DESC LIMIT 0,6");  
if (!
$MZresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZrow mysql_fetch_array($MZresult) ) {  

// $albumid = $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 

// echo('<P ALIGN=center>');  

echo('<a target = "_new" href="' $copperminepath '/displayimage.php?album=' $albumid .  
'&pos=-' $pos '">'); //make thumbnail clickable 

echo('<IMG SRC="' $copperminepath '/albums/');           //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . 
     
'" alt=' $MZrow['filename'] . ' ''border=0 width=60 height=50>' '</a> &nbsp;&nbsp;'); //outputs path from /userspics 
}  

//This displays the picture's album name and 
//links it to the coppermine album 

$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'");  
if (!
$MZalbumresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZalbumname mysql_fetch_array($MZalbumresult) ) {  
echo(
'<FONT SIZE=1>'); 
echo(
'<P ALIGN=center>');  

echo(
'<a href="' $copperminepath .  
'/thumbnails.php?album=' $albumid '">' .  
$MZalbumname['title'] . '</a>' '</p>');  
}  

if (! @
mysql_select_db('coppermine') ) {  
die( 
'<p>Unable to reload the main website ' .  
'database at this time.</p>' );  
}  

?>



2) gallery_center_random_block.php
Code: [Select]

<?php  

//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 

$copperminepath '/gallery';  //***YOU MUST CHANGE THIS*** 

//This connects to the mysql DB 
//***change username and password below*** 

$MZrandompic = @mysql_connect('localhost''root'''); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) {  
echo( 
'<p>Unable to connect to the ' .  
'database server at this time.</p>' );  
exit();  
}  

//select photo DB 
//***YOU MUST CHANGE THIS*** 

if (! @mysql_select_db('coppermine') ) { 
die( 
'<p>Unable to locate the picture ' .  
'database at this time.</p>' );  
}  

//This gets a random picture record from the database and 
//the picture's location and displays it 

$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY RAND() LIMIT 0,6");  
if (!
$MZresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZrow mysql_fetch_array($MZresult) ) {  

// $albumid = $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 

// echo('<P ALIGN=center>');  

echo('<a target = "_new" href="' $copperminepath '/displayimage.php?album=' $albumid .  
'&pos=-' $pos '">'); //make thumbnail clickable 

echo('<IMG SRC="' $copperminepath '/albums/');           //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . 
     
'" alt=' $MZrow['filename'] . ' ''border=0 width=60 height=50>' '</a> &nbsp;&nbsp;'); //outputs path from /userspics 
}  

//This displays the picture's album name and 
//links it to the coppermine album 

$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'");  
if (!
$MZalbumresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZalbumname mysql_fetch_array($MZalbumresult) ) {  
echo(
'<FONT SIZE=1>'); 
echo(
'<P ALIGN=center>');  

echo(
'<a href="' $copperminepath .  
'/thumbnails.php?album=' $albumid '">' .  
$MZalbumname['title'] . '</a>' '</p>');  
}  

if (! @
mysql_select_db('coppermine') ) {  
die( 
'<p>Unable to reload the main website ' .  
'database at this time.</p>' );  
}  

?>



gallery_center_toprated_block.php
Code: [Select]

<?php  

//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 

$copperminepath '/gallery';  //***YOU MUST CHANGE THIS*** 

//This connects to the mysql DB 
//***change username and password below*** 

$MZrandompic = @mysql_connect('localhost''root'''); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) {  
echo( 
'<p>Unable to connect to the ' .  
'database server at this time.</p>' );  
exit();  
}  

//select photo DB 
//***YOU MUST CHANGE THIS*** 

if (! @mysql_select_db('coppermine') ) { 
die( 
'<p>Unable to locate the picture ' .  
'database at this time.</p>' );  
}  

//This gets a random picture record from the database and 
//the picture's location and displays it 

$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY pic_rating desc LIMIT 0,6");  
if (!
$MZresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZrow mysql_fetch_array($MZresult) ) {  

// $albumid = $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 

// echo('<P ALIGN=center>');  

echo('<a target = "_new" href="' $copperminepath '/displayimage.php?album=' $albumid .  
'&pos=-' $pos '">'); //make thumbnail clickable 

echo('<IMG SRC="' $copperminepath '/albums/');           //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . 
     
'" alt=' $MZrow['filename'] . ' ''border=0 width=60 height=50>' '</a> &nbsp;&nbsp;'); //outputs path from /userspics 
}  

//This displays the picture's album name and 
//links it to the coppermine album 

$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'");  
if (!
$MZalbumresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZalbumname mysql_fetch_array($MZalbumresult) ) {  
echo(
'<FONT SIZE=1>'); 
echo(
'<P ALIGN=center>');  

echo(
'<a href="' $copperminepath .  
'/thumbnails.php?album=' $albumid '">' .  
$MZalbumname['title'] . '</a>' '</p>');  
}  

if (! @
mysql_select_db('coppermine') ) {  
die( 
'<p>Unable to reload the main website ' .  
'database at this time.</p>' );  
}  

?>



gallery_center_topview_block.php
Code: [Select]

<?php  

//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 

$copperminepath '/gallery';  //***YOU MUST CHANGE THIS*** 

//This connects to the mysql DB 
//***change username and password below*** 

$MZrandompic = @mysql_connect('localhost''root'''); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) {  
echo( 
'<p>Unable to connect to the ' .  
'database server at this time.</p>' );  
exit();  
}  

//select photo DB 
//***YOU MUST CHANGE THIS*** 

if (! @mysql_select_db('coppermine') ) { 
die( 
'<p>Unable to locate the picture ' .  
'database at this time.</p>' );  
}  

//This gets a random picture record from the database and 
//the picture's location and displays it 

$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY hits desc LIMIT 0,6");  
if (!
$MZresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZrow mysql_fetch_array($MZresult) ) {  

// $albumid = $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 

// echo('<P ALIGN=center>');  

echo('<a target = "_new" href="' $copperminepath '/displayimage.php?album=' $albumid .  
'&pos=-' $pos '">'); //make thumbnail clickable 

echo('<IMG SRC="' $copperminepath '/albums/');           //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . 
     
'" alt=' $MZrow['filename'] . ' ''border=0 width=60 height=50>' '</a> &nbsp;&nbsp;'); //outputs path from /userspics 
}  

//This displays the picture's album name and 
//links it to the coppermine album 

$MZalbumresult = @mysql_query("SELECT * FROM cpg11d_albums WHERE aid = '$albumid'");  
if (!
$MZalbumresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZalbumname mysql_fetch_array($MZalbumresult) ) {  
echo(
'<FONT SIZE=1>'); 
echo(
'<P ALIGN=center>');  

echo(
'<a href="' $copperminepath .  
'/thumbnails.php?album=' $albumid '">' .  
$MZalbumname['title'] . '</a>' '</p>');  
}  

if (! @
mysql_select_db('coppermine') ) {  
die( 
'<p>Unable to reload the main website ' .  
'database at this time.</p>' );  
}  

?>

Logged
DaMysterious.

Inertia

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://www.alucinae.com
Gallery Block for my phpBB portal
« Reply #5 on: November 10, 2003, 01:59:30 pm »

Thank you so much! I shall give that a try as soon as i get home from work tonight!

-Fingers crossed!-

:)

Zarsky

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 268
    • Zerr Family Website
Gallery Block for my phpBB portal
« Reply #6 on: November 10, 2003, 05:15:54 pm »

DaMysterious,

Great addition to my code.  Also...I want to point out to everyone that this code DOES NOT obey permissions set within the gallery.  If I get some time perhaps I will tray to add some permission checking, but I do not think this will be easily accomplished. I was thinking the only way it will work is if you are using some form of BBS integration.  Anyone have any ideas?
Logged
Read the Online DOCs, FAQ, and SEARCH the board BEFORE posting questions for help.

Inertia

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
    • http://www.alucinae.com
Gallery Block for my phpBB portal
« Reply #7 on: November 10, 2003, 11:46:00 pm »

Thank you thank you so much!

It works great now, especially after I downloaded the X-treme mod.

I actually had the code in the TPL file from yesterday, and after I uploaded the mod, it worked immediately without creating a "file.php". I just have the code right in the main TPL file.

Its exactly what I needed!

Thanks again! :)

TheNakedMan

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
    • http://www.runaked.com
Gallery Block for my phpBB portal
« Reply #8 on: November 12, 2003, 07:39:59 am »

what if I wanted to have 4-5 random pics like this or newest on the main forum page.  

What would I change?
Logged
Are you naked?  More importantly, do you want to be?

Valerie

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Gallery Block for my phpBB portal
« Reply #9 on: January 31, 2004, 04:14:36 pm »

Hi, I was wondering how the password & username are protected from being seen in these files. (I'm learning - but my knowledge is still limited.)

 These codes really looks like what I want. They work fine in regular php files, correct? What if I want to put more than one random pic on my main page but keep them in a scroll box so they only take up a certain amount of room on the page - just set a basic scroll box around it? My memory isn't the best - anyone mind slapping that code here for reference? (Just asking)

Also, is there a way to control the thumbnail size that shows up with this code? Thank you!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Gallery Block for my phpBB portal
« Reply #10 on: February 01, 2004, 01:55:46 pm »

Passwords are not stored within files, but in the mySQL db, no need to worry about that.

GauGau
Logged

gmarik

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Where is the coder from?
« Reply #11 on: February 16, 2004, 06:29:04 pm »

How much this is phpBB revelant and could it be suded with some modificatoins over vBulletin 3.0? Ady idea?!  :shock:
Logged
webmaxtor.com

DesiFlavour

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Gallery Block for my phpBB portal
« Reply #12 on: March 05, 2004, 02:23:34 am »

Hey guys, excellent feature!

Ive managed to get that page working fine, only problem now is how do i place it on the portal.

I would if possble like to replace it with the top announcement table in the middle of the portal as it displays 5 most recent ones which is abit too many anyway.

If not then can you tell me how i can just plce the random pic table just below the welcome table in the middle.

As in what code do i need to include in the portal_body.tpl or portal.php.

I've got a rough idea so if you can just guide be please  :)

Thank you, would very much appreciate your help!  :)
Logged

laziale4ever

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
    • http://www.laziofever.com
Gallery Block for my phpBB portal
« Reply #13 on: March 16, 2004, 06:19:29 pm »

Thanks guys for the great feature..

I just made a tiny addition to the newest pics.. when you require the admin approval for some uploads.. So, it wont display pictures before approving them.

in the original code:

Code: [Select]
$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures ORDER BY pid DESC LIMIT 0,6");  

my edited code:

Code: [Select]
$MZresult = @mysql_query("SELECT * FROM cpg11d_pictures WHERE approved = 'YES' ORDER BY pid DESC LIMIT 0,6");  
Logged

r4merlin

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Gallery Block for my phpBB portal
« Reply #14 on: March 21, 2004, 05:00:36 pm »

Quote
Hey guys, excellent feature!

Ive managed to get that page working fine, only problem now is how do i place it on the portal.

I would if possble like to replace it with the top announcement table in the middle of the portal as it displays 5 most recent ones which is abit too many anyway.

If not then can you tell me how i can just plce the random pic table just below the welcome table in the middle.

As in what code do i need to include in the portal_body.tpl or portal.php.

I've got a rough idea so if you can just guide be please  

Thank you, would very much appreciate your help!


Same where could you explain that  part of it
Logged

sdalgleish

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Gallery Block for my phpBB portal
« Reply #15 on: March 22, 2004, 08:06:01 pm »

I've just been playing with this.  I had a little trouble getting it started because it kept telling me that 'thumb_' was not a defined constant.  The solution is to:

Replace
Code: [Select]
echo('<IMG SRC="' . $copperminepath . '/albums/');           //append base dir structure
echo($MZrow['filepath'].thumb_.$MZrow['filename'] .
     '" alt=' . $MZrow['filename'] . ' '. 'border=0>' . '</a>'); //outputs path from /userspics


with
Code: [Select]
echo('<IMG SRC="' . $copperminepath . '/albums/');           //append base dir structure
echo($MZrow['filepath']. 'thumb_' .$MZrow['filename'] .
     '" alt=' . $MZrow['filename'] . ' '. 'border=0 align=center>' . '</a>'); //outputs path from /userspics


All that is changed is putting single quote (') around the word thumb_ so that it's a string and not a constant.  Seems to work for me now.  Hope that's useful to someone.

Nice mod zarsky99 - I like it!
Logged

futtlui

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Gallery Block for my phpBB portal
« Reply #16 on: April 15, 2004, 09:15:53 pm »

just a question: i'm new to this portal stuff but i'd like to have one soon for my phpbb.
of course it should include a block with pictures of my existing coppermine gallery.

Does it matter, which portal i choose?
About which one are you talking about in this thread?
Smartor's ezPortal? AWSW's Portal? Another one?

BTW I don't want to use nuke or one of these big cms-things.

TIA
futtlui
Logged

aem

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Re: Gallery Block for my phpBB portal
« Reply #17 on: April 25, 2004, 07:27:12 pm »

I tried this script and when i run it it went to a page with this

Quote
Unable to connect to the database server at this time.

What could i be doing wrong?
Logged

DaMysterious

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • My CPG Recources
    • My CPG Recources
Re: Gallery Block for my phpBB portal
« Reply #18 on: April 25, 2004, 10:49:52 pm »

just a question: i'm new to this portal stuff but i'd like to have one soon for my phpbb.
of course it should include a block with pictures of my existing coppermine gallery.

Does it matter, which portal i choose?
About which one are you talking about in this thread?
Smartor's ezPortal? AWSW's Portal? Another one?

BTW I don't want to use nuke or one of these big cms-things.

TIA
futtlui

I did talk about Smartor's EZ-Portal. But the codes should work in other evironments also.
Logged
DaMysterious.

evildave

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Gallery Block for my phpBB portal
« Reply #19 on: May 11, 2004, 12:34:03 am »

First post....

My site is not a phpBB portal just a standard php site. I just wanted to say thanks. I've been looking for a hack like this. I have coppermine installed on a different server then my website and this hack works great  :)

I'm just getting started with my site but heres the link if you want to check it out.
site: http://evildave.jaywebdesigns.com

Thanks again.
Logged
Pages: [1] 2 3 4   Go Up
 

Page created in 0.033 seconds with 19 queries.