Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Embedding content (such as blocks of html) within catlist?  (Read 6357 times)

0 Members and 1 Guest are viewing this topic.

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Embedding content (such as blocks of html) within catlist?
« Reply #1 on: May 25, 2011, 09:11:30 am »

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

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120
Re: Embedding content (such as blocks of html) within catlist?
« Reply #2 on: May 25, 2011, 02:37:43 pm »

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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Embedding content (such as blocks of html) within catlist?
« Reply #3 on: May 25, 2011, 02:59:49 pm »

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?
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120
Re: Embedding content (such as blocks of html) within catlist?
« Reply #4 on: May 25, 2011, 10:50:00 pm »

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..
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Embedding content (such as blocks of html) within catlist?
« Reply #5 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.
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120
Re: Embedding content (such as blocks of html) within catlist?
« Reply #6 on: May 27, 2011, 07:06:47 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 :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Embedding content (such as blocks of html) within catlist?
« Reply #7 on: May 27, 2011, 07:28:14 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.
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120
Re: Embedding content (such as blocks of html) within catlist?
« Reply #8 on: May 27, 2011, 11:21:48 pm »

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!! :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Embedding content (such as blocks of html) within catlist?
« Reply #9 on: May 28, 2011, 10:02:46 am »

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.
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120
Re: Embedding content (such as blocks of html) within catlist?
« Reply #10 on: May 29, 2011, 04:28:59 am »

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

Code: [Select]
<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 :)
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120
Re: Embedding content (such as blocks of html) within catlist?
« Reply #11 on: May 30, 2011, 12:43:29 pm »

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

So I'm all done! Hooray!

The gallery is looking very awesome ^_^
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Embedding content (such as blocks of html) within catlist?
« Reply #12 on: May 30, 2011, 06:59:24 pm »

My friend actually threw together some code for me in the end :)
Please post that code for the benefit of others:
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.
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 20 queries.