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]   Go Down

Author Topic: Link-Solution to Gallery in VBulletin 3.x  (Read 14918 times)

0 Members and 1 Guest are viewing this topic.

alfisti.net

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
    • http://alfisti.net
Link-Solution to Gallery in VBulletin 3.x
« on: August 07, 2004, 12:31:09 pm »

Ciao,

I don´t understand a lot from php and I give it up to wait for a good integration in PHP.
So I made a small, link solution. I know it is not perfect but it works :)
Should also run under Coppermine 1.3 if the tables and fields are the same (testet with VB 3.03 and Coppermine 1.2)


What does it do?
Add a gallery-link to postbit (display of user data in every posting of him) if the user has uploaded a picture to the gallery.
Example: http://www.alfa-forum.com/showthread.php?t=29404
On the right side, the links with the car.

Install this:

1.
Create a custom profil field: "radio button"
- Option No/Yes
- Set Default to: YES
- Field required: YES (I have an german version so I don´t know the exact words of the  adminCP)
- Field hided in profil: NO (IMPORTANT!!)
- Field searchable: NO
- Show on Memberlist: NO
- Allow user to input their own value: NO
- Which page display option: this is your choice!
Notice the field ID, this is important.

2.
Customize postbit-template
Add the following to a place you want to display the link:
Code: [Select]
<if condition="$post[field1] == 'Yes'"><div>
                                        <img src="link/to/your/icon.gif" border="0" alt="See Gallery pictures from $post[username] ">
                                        <a target="_blank" href="http://www.yourdomain.com/gallery/thumbnails.php?album=lastupby&uid=$post[userid]">See Pictures from $post[username]</a>
                                        </div></if>

IMPORTANT: change this "$post[field1]" to the field ID of your new custom field. Change the links to your URLs ;)

2a
To link personal albums add the following
Code: [Select]
<if condition="$post['catuserid'] = $post['userid'] + 10000"></if>

<if condition="$post[field2] == 'Yes'"><div>
                                        <img src="link to your/icon.gif" border="0" alt="Album of $post[username] ">
<a target="_blank" href="http://www.yourdomain.com/gallery/index.php?cat=$post[catuserid]">Album of $post[username] </a>
</div></if>
Thanks to Xeon of the german VB for the solution with the catuserID :)

3.
Edit the file forumlinks.php: Change field ID and prefix to your coppermine prefix
$DB_site->query('UPDATE userfield,COPPERMINEPREFIX_pictures SET userfield.field1 = "Yes" WHERE userfield.userid = COPPERMINEPREFIX_pictures.owner_id');

Save the file "forumlinks.php" into: includes\cron

4.
Create a new task in Admin CP (the third group from bottom in the left menu)
Name: Forumlinks
all other with "*" or what you prefer
Filename: ./includes/cron/forumlinks.php

thats all.
The cron will update the new custom-field to "Yes" if the user has uploaded a picture.
The postbit template show the link only if a picture exist.

I know this solution is not perfect but it works untill someone coded this is php.

André
Logged

alfisti.net

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
    • http://alfisti.net
Re: Link-Solution to Gallery in VBulletin 3.x
« Reply #1 on: August 07, 2004, 12:32:58 pm »

remove the ".txt" extension before upload to include\cron
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Link-Solution to Gallery in VBulletin 3.x
« Reply #2 on: August 07, 2004, 01:11:41 pm »

Just to make this clear for newbies: this mod will not integrate coppermine with VBulletin - you will have to apply the bridge file stuff outlined in the documentation. Instead, this mod will make the integration even closer - there will be links inside your vbulletin board to coppermine.

GauGau

P.S. Moved to mods section
Logged

thaDRAGON

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Link-Solution to Gallery in VBulletin 3.x
« Reply #3 on: August 11, 2004, 06:08:56 am »

How do i do the same with IPB? i wanted to have something like

"<tr>
 <td class="row3" valign='top'><b>Album</b></td>
 <td align='left' class='row1'><a href='http://hookup.ph/cpg/index.php?cat={$info['mid']}'>View This User's Album</a></td>
  </tr>"

My problem is how do i put something like 10000 + {$info['mid']} ?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Link-Solution to Gallery in VBulletin 3.x
« Reply #4 on: August 11, 2004, 07:31:54 am »

I recommend asking this on the IPB support board.

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.036 seconds with 15 queries.