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

Author Topic: Link to other Sites Ideas  (Read 7711 times)

0 Members and 1 Guest are viewing this topic.

skyer2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Link to other Sites Ideas
« on: July 21, 2004, 11:17:51 pm »

I've searched through topics and have seen every attempt to make it so that coppermine could link to another mirror instead of the albums folder, was shot down. This is a HUGE limitation that no one seems to care about. Since my website is based around media, having everything on the same server is pretty crazy. So, i tried some ideas and actually got VERY close to one of them working.

I uploaded a dummy file to the albums folder "dummy.jpg". Then I went into phpmyadmin, went to the pictures database, and edited the information. For the picture URL I changed it to what I wanted (http://differentdomain.com/) and the filename (realfile.wmv). I then went back into the album view, it recongized it was a .wmv file, but didn't play. So i viewed the source, and the ONLY thing holding it back from working was a /album/ infront of the URL. If that /album/ was not there, it would work perfectly.

Is there something I can edit so that the /album/ has to be manually added, or if i can just plain take that out and add it back through phpmyadmin to all the files? Anyways I hope you guys consider this post more than you have with the others, I really think I'm close to getting this to work.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Link to other Sites Ideas
« Reply #1 on: July 22, 2004, 09:34:22 am »

it's not that easy I'm afraid - of course you could get rid of the "albums" thingy in the url, but how is coppermine supposed to generate intermediate files and thumbnails on a remote server? You would have to manually create them on the remote server, and you would have to modify the coppermine database entries manually each time you want to add an image to your gallery. The point of using coppermine is that it generates the additional views for your files on the fly. If you want to do everything manually, then there's no need for you to use coppermine anyway, you could code your gallery with plain html (just a collection of links to remote servers).
Your idea has been discussed in the past mayn times over - I won't repeat this discussion. If you manage to come up with some code that does what you want it to do, then fine. You're welcome to post your hacks as well. But there's no support for this general idea, as it leads nowhere the dev team wants to go.

GauGau
Logged

skyer2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Link to other Sites Ideas
« Reply #2 on: July 22, 2004, 08:10:33 pm »

I actually believe it would be kind of easy. Again i'm not professional at the code or anything, but it just seems to make sense to me this way.

Somehow manipulate it so that when it posts into the mysql database, it posts everything "/albums/gallery/pictures" and not just "/gallery/pictures". Then back at when it displays the image, have it pull up the full path instead of automatically adding "/albums" in front of it. So in the code it will be <img src="/albums/gallery/pictures/pic.jpg">.

This way, when you go back through phpmyadmin and edit the url, it will not add albums in front of it. And for the pictures that are hosted on the server, they will not have to be touched. So you still have the automation, and you have the ability of linking to other sites.

So this is what I think has to happen
-A variable has to be changed so that when it submits to the database, it adds "/albums/" infront of it
-And a variable needs to be changed so when you view the picture, you don't have "/albums/albums/gallery"

So to me, the non-php coder, this seems to make sense. What do you think?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Link to other Sites Ideas
« Reply #3 on: July 23, 2004, 10:13:16 am »

like I said, it doesn't work that way. You're welcome to try, go ahead and code the modifications. We (the dev coppermine team) will not.

GauGau
Logged

skyer2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Link to other Sites Ideas
« Reply #4 on: July 23, 2004, 02:31:38 pm »

Alright, please bare with me a little longer. If it doesn't work that way, then how does it? What goes on to make it so that the /albums/ has to be automatically in front of the URL? It makes more sense to me that the /albums/ is placed in front automatically in effort to save database room (to eliminate having /albums/ in every single entry makes it smaller). Are you sure it's just not a spacesaver thing? If not, can you please give me a little rundown on how it posts with /albums/ in front and why?
« Last Edit: July 23, 2004, 02:39:16 pm by skyer2000 »
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Link to other Sites Ideas
« Reply #5 on: July 23, 2004, 03:09:59 pm »

Look at the function add_picture adds the picture to the database, function get_pic_url gets the URL of the picture - may be this is where you should be looking. If you can manage to convince this function to return the URL of the image then you are in business. 

Do post your mod if you manage one
Logged
SANIsoft PHP applications for E Biz

skyer2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Link to other Sites Ideas
« Reply #6 on: July 23, 2004, 04:48:56 pm »

When looking through code i found this in includes/functions.inc.php

Code: [Select]
// Return the url for a picture, allows to have pictures spreaded over multiple servers
function get_pic_url(&$pic_row, $mode)
{
        global $CONFIG,$THEME_DIR;

        static $pic_prefix = array();
        static $url_prefix = array();

        if (!count($pic_prefix)) {
                $pic_prefix = array(
                        'thumb' => $CONFIG['thumb_pfx'],
                        'normal' => $CONFIG['normal_pfx'],
                        'fullsize' => ''
                );

                $url_prefix = array(
                        0 => $CONFIG['fullpath'],
                );
        }

        $mime_content = get_type($pic_row['filename']);
        $filepathname = null;

When it says "multiple servers" does it mean exactly what I want? Or am i interpretting it incorrectly?
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Link to other Sites Ideas
« Reply #7 on: July 24, 2004, 04:33:58 am »

Please read the code, figure out, and post your solution :)
Logged
SANIsoft PHP applications for E Biz

skyer2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Link to other Sites Ideas
« Reply #8 on: July 26, 2004, 05:32:50 am »

Been looking through the code, still no luck. (remember i'm just a newbie when it comes to php). I did however come up with another possible solution and was wondering what you guys thought.

Make the document something that once you click the thumbnail to view it, it automatically executes a script or something of that matter that pops a window above to a desired location. So sort of like a pop-up advertisement... but... different.
Logged

skyer2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Link to other Sites Ideas
« Reply #9 on: July 26, 2004, 06:05:28 am »

Checked into it some more, here's what i've come up with....

Make it so that you upload a html file that contains a simple redirect script to the movie you want.

So I went into the database and added (html , text/html , document) in the filetypes database, it recognizes its a html file and even has a thumbnail for it. However, whatever html file i upload, then later click on it in the album, it says that it cannot be found. The really weird thing about it is even when i manually type in its location, it says not found. In the ftp program however, it can find the file and has the code i want (i've tried different code to see if that was the problem).

If I can get it to open the html file, we're in business.
« Last Edit: July 26, 2004, 06:38:07 am by skyer2000 »
Logged

skyer2000

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Link to other Sites Ideas
« Reply #10 on: July 26, 2004, 07:05:12 am »

GOT IT WORKING NOW

Finally! Had to do a little workaround but now the gallery can link to other sites EASILY. While not embedded it still functions exactly how I need it too. For some reason html was not showing up, so i gave up even trying with that. So i enabled php extensions to work, put regular html redirect code in the php file, uploaded it, and walla. Click on the image like you would with any other document and it redirects you to any page you specify (whether it be video, image, audio, or just another website). I don't know if you would even consider this a mod, but it truly helps out for people that have content way to large to fit all on their server.

Here's an example of the redirect code in the php file i uploaded

Code: [Select]
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yoursite.com/file.wmv">
I added the custom thumbnail, worked perfect. Want me to post this as a hack or somethin?
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: Link to other Sites Ideas
« Reply #11 on: July 26, 2004, 07:10:15 am »

Yes post the hack here... We will move it to its proper place in Hacks / Mods
Logged
SANIsoft PHP applications for E Biz

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Link to other Sites Ideas
« Reply #12 on: July 27, 2004, 08:18:48 am »

as skyer2000 seems reluctant to resolve this thread, I will do so: http://forum.coppermine-gallery.net/index.php?topic=8287

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.