Closed (fixed)
Project:
Parallel
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2010 at 14:23 UTC
Updated:
3 Feb 2011 at 11:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
srobert72 commentedOther solution could be to give us function with2 parameters : URL and type (img, js, css).
Someting like parallel_replace_url($url, $type)
Then we use it to replace our URLs before to write them in our templates when we know its an image.
This solution isn't as nice and global. But it's a simple one.
Comment #2
ball.in.th commentedI was just trying to get parallel to work with lightbox images. Perhaps patching the core file_create_url() could be used for this.
Comment #3
srobert72 commentedI think this patch will not perfectly work.
It replace all URL from /files directory with Parallel IMG alias even if that's not an image.
Comment #4
srobert72 commentedIn my theme file : template.php
I created this function :
And I use it this way :
cdn_url($url) is used same way as url($url) : http://drupalcontrib.org/api/function/url/6
I use cdn_url($url) in my template when I construct Lightbox tag manually. It works.
But it doesn't resolves problem when Lightbox tag is constructed by Views for example.
EDIT:
Sorry Parallel module works for automatic Lightbox tags in Views with Lightbox rendering image.
So my problem was just for Lightbox tags generated manually in template.php.
In this case using cdn_url($url) solves my problem.
Comment #5
mikeytown2 commentedReplacing lightbox images is sorta overkill, unless your using this as a true CDN. Thought on how to tackle this?
@srobert72
You have an interesting idea, I should include your function; but have it take 2 parameters: $url, $domain. $domain can be img, css, js.
Comment #6
srobert72 commentedSimilar problem with ColorBox module.
See #773006: Add support for the Parallel module
Comment #7
Andrew Udvare commentedMeh, I strongly suggest some drupal_alter()'s in these replacement functions for fixes so we don't have to hack 'core' (parallel.module) so to speak.
Comment #8
wim leersWill be obsoleted by #933942: Merge Parallel and CDN modules: migration path.