Add specific html to certain albums?

JakeJohnsonster

Joined: 2013-01-17
Posts: 24
Posted: Wed, 2013-01-30 13:00

I've looked through all the modules and can't find anything. Is there any way to add specific html to certain albums?

For example, in one album, add some html that says, "This gallery rocks" and in another album, "This is great" and in others, nothing at all. Is there a module for that?

 
JakeJohnsonster

Joined: 2013-01-17
Posts: 24
Posted: Wed, 2013-01-30 13:20

One thing I would add, I am not opposed to manually doing this. For example, if there is no module, then I am thinking that I could add a column to the items table in mysql, but I am not quite sure how I would call that in the code.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-01-30 14:35

The album description with the html_purifier module or the tiny-mce module?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
JakeJohnsonster

Joined: 2013-01-17
Posts: 24
Posted: Wed, 2013-01-30 14:56

I am checking those out, but I think the bigger problem is that I am trying to add javascript. I think I saw that you did the code block module (for sidebars)....I don't see the advanced options. Is there a way to allow the javascript in the purifier module? Or, in general?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2013-01-30 15:49

Haven't heard anyone mention it in a while, but seems like a great case for the custom fields module. (If you're going to manually add a table to the database, you're basically re-creating the module anyhow.) http://codex.galleryproject.org/Gallery3:Modules:custom_fields

Not sure what kind of js you're adding (or why), but it's probably not a good idea for the purifier to allow that by default. (The whole point is to allow as few opportunities for injecting/executing/manipulating scripts as possible.)

Depending on what you're trying to do, there may be other ways to do it--even with the current restrictions--but can't say without knowing the nature of the js you're adding.

 
JakeJohnsonster

Joined: 2013-01-17
Posts: 24
Posted: Wed, 2013-01-30 16:31

I tried the custom fields module, but it looks like it doesn't like Javascript either. I'm trying to call an external javascipt, that serves as a content locker for some galleries (but only some, so I don't want it on every page). It looks like a Google Adsense Javascript call.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2013-01-30 17:08

I don't do adsense, so that doesn't tell me much.
I do know, though, that some other users have added adsense to page.html.php and the codeblock.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-01-30 22:01

Content locker??? Isn't that what permissions are for?

Anyway you would have to edit your theme.... http://galleryproject.org/node/100753#comment-368383

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
JakeJohnsonster

Joined: 2013-01-17
Posts: 24
Posted: Thu, 2013-01-31 08:06

A "content locker" is a way to monetize content. So, let's say you have a bunch of galleries, but one of them is super cool, has a huge zip download with it. So, with a content locker, you place a piece of JavaScript in the gallery and it requires the user to complete a survey/trial/offer (which you get paid for) prior to them being allowed to access the content.

I'll have to check your link above. The easiest thing would be to disable the JavaScript protection (particularly since I am the only user), but I don't see any easy way to do that.