How to make files accesible by URL?

waspper

Joined: 2012-07-05
Posts: 7
Posted: Wed, 2012-07-18 18:36

According to this forum topic: http://gallery.menalto.com/node/107412, I'm trying to write a simple module to share my galleries. At this moment, I have an idea how it will work.

For that purpose, I will provide several files to share (jQuery plugin, a JS plugin to make galleries and CSS files). That files would be accesible by an HTTP URL (such as http://www.mysite.com/mymodule/share/file-to-share.css), because users will copy and paste that code.

My question is: How can I make that files accesible by an URL, to allow users to include them in other pages?... In my module folder I ve created a folder called 'external/galleria' (the jQuery plugin)... I would like to share these files... Any idea?

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25953
Posted: Wed, 2012-07-18 22:44

http://codex.gallery2.org/Gallery3:Modules:embedlinks http://codex.gallery2.org/Gallery3:Modules:externals

If that is not what you are after you will have to explain a bit better for me to understand what you are after.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
waspper

Joined: 2012-07-05
Posts: 7
Posted: Wed, 2012-07-18 23:39

Ok, thaks for your reply...

But I wish to make some files (file1.css, file2.css, file3.js, file4.js) accesible, like this:
http://www.mygallerysite.com/mymodule_url/file-to-share.ext. That, because I would like to provide my files (file1.css, file2.css, file3.js, file4.js) as resources for external usage. For example:
<link rel="stylesheet" type="text/css" href="http://www.mygallerysite.com/mymodule_url/file1.css" />
<link rel="stylesheet" type="text/css" href="http://www.mygallerysite.com/mymodule_url/file2.css" />
<script type="text/javascript" src="http://www.mygallerysite.com/mymodule_url/file3.js"></script>
<script type="text/javascript" src="http://www.mygallerysite.com/mymodule_url/file4.js"></script>

Is that... I would like a way to make these files usable into a external website...

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25953
Posted: Sat, 2012-07-21 04:20

I don't know how a module would know about css and JS files other than:
$theme->script("file1.js");

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
tempg

Joined: 2005-12-17
Posts: 1633
Posted: Sat, 2012-07-21 16:02

@waspper: No idea what you're trying to do here, but maybe see what the externals module did and use that as a starting point? And for the URL structure you're going for, maybe see that the alltags module did to get a url?

Login or register to post comments