Embedding content (such as blocks of html) within catlist? Embedding content (such as blocks of html) within catlist?
 

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]

Main Menu

Embedding content (such as blocks of html) within catlist?

Started by elwave, May 24, 2011, 08:52:44 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

elwave

Heya.. sorry for all the topics.. if it's any consolation though I'll actually be able to donate to you mega soon, I just need some help with some stuff!

So erm, yeah I was told it would be good to embed stuff within the gallery body, which as I understand is principally "catlist". I know I can move anycontent around so I can put it after catlist, etc, but I was wondering if it's possible to put things within catlist somehow? I'm aware it's generated and so it might be a bit tricky >.<

Thanks, and sorry I promise to donate as soon as it's possible!


Elwave

Αndré

Can you please explain more detailed where exactly you want to 'embed' what content? Please also post a link to your gallery.

elwave

it's an adult gallery so:

(Not safe for work) http://www.sonichentai.net/gallery


Basically, those adverts on the right hand side, I was advised to put them within the gallery body, such as between sections, instead of down the side. Due to the way the gallery is generated though, I was unsure how I could go about doing this >.<

Obviously they're just chunks of code, but I'm not sure how to make it input them between categories! What do you reckon?

Αndré

So you want to put the same ad code before/after every category link, such as

  • User Galleries
  • Sonic Girls
  • Female FC's
  • Straight Couples
  • etc.
right?

elwave

erm.. hm... no not necessarily the same, I don't know if the ad company would like me doing that! Probably just each one just once, although I know that might make it trickier. Sorry to ask for such a fiddly thing!

I might put one lot of ad code at one place, another lot at another, etc, ideally. Hm..

Αndré

In that case you'll have to add a new token to $template_cat_list inside the catrow block and replace that token within the function theme_display_cat_list.

elwave

Quote from: Αndré on May 26, 2011, 12:43:04 PM
In that case you'll have to add a new token to $template_cat_list inside the catrow block and replace that token within the function theme_display_cat_list.

sorry that's a bit advanced for me! haha :)

So erm.. where is $template_cat_list and where is the theme_display_cat_list function? Sorry to take up so much time!

However I am finally earning money on it! Woo! So I'll donate asap! lol :)

Αndré

Quote from: elwave on May 27, 2011, 07:06:47 PM
where is $template_cat_list and where is the theme_display_cat_list function?
You have to copy it from themes/sample/theme.php to your theme's theme.php if it doesn't exist.

elwave

right, ok I added both of those sections to my theme, and I understand that I can edit the catrow block to make things appear in every category (such as if I did want to duplicate a block of code there every time, which may come in useful in future actually!).

And.. wow this is complex! lol

Ok so.. I wanted to get it to put different blocks of HTML/PHP or whatever after certain sections... erm... lol

I take it the new token, it would be something like {AFTER_CATEGORY3}, and then in theme_display_cat_list I would define the specifics of what that actually means? Is that correct?

Would you mind if we like, answered that example of what the code would look like if I wanted to insert a chunk of code after category 3, particularly the code within theme_display_cat_list?

Thanks, sorry! I guess this might help future people too though!! :)

Αndré

With your generic question 'I want to add something somewhere somehow after category 3' it's not possible to help you. Explain what exactly you want to display where and how. Posting a screen-shot that visualizes your needs might help as well.

elwave

Ok erm... well let's say after category 3 I want to put this code:

<span style="color:blue">This is text after category 3!</span>

but not have it appear after the other categories. It's basically that simple lol :)  Because once I know how to do the basic principle of that, I'm sure I can work the rest out for myself :)

elwave

My friend actually threw together some code for me in the end :)

So I'm all done! Hooray!

The gallery is looking very awesome ^_^

Αndré

Quote from: elwave on May 30, 2011, 12:43:29 PM
My friend actually threw together some code for me in the end :)
Please post that code for the benefit of others:
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
Resolve your threads
If you have found an answer to your question, resolve your thread. Don't just post "I have found the answer", but tell others what you actually did to solve your issues. Posting a link to the page where you found the answer might help. Describing what you did might help as well.