coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: bobby131313 on July 25, 2006, 05:55:52 PM

Title: Help with inserting some extra content
Post by: bobby131313 on July 25, 2006, 05:55:52 PM
Hi all, I've been pretty successful hacking into every page but this one.....

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.coincommunity.org%2Fimages%2FProject1.jpg&hash=9cf2d9a485d0d5c7e70762f65b5cd21548244810)

I've searched the forums and can't find the hack for this page anywhere. I can't quite figure out which template to use in the sample theme.php. If that's even where I have to look.

Thanks in advance!

http://www.coincommunity.org/gallery/
Title: Re: Help with inserting some extra content
Post by: Sami on July 25, 2006, 06:15:40 PM
URL don't work for me !
Title: Re: Help with inserting some extra content
Post by: bobby131313 on July 25, 2006, 06:26:13 PM

Hmmm.. Works fine for me.
Title: Re: Help with inserting some extra content
Post by: Sami on July 25, 2006, 06:31:31 PM
sorry it seems that My isp block your URL
anyway you can use anycontent.php (under root of gallery) to view custom info or script
read this for how to enabling:
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list
Title: Re: Help with inserting some extra content
Post by: Joachim Müller on July 25, 2006, 07:19:41 PM
If you need more sophisticated content management, try the MiniCMS plugin (http://forum.coppermine-gallery.net/index.php?topic=15543.0)
Title: Re: Help with inserting some extra content
Post by: bobby131313 on July 25, 2006, 10:03:42 PM
Quoteanyway you can use anycontent.php (under root of gallery) to view custom info or script
read this for how to enabling:
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list

That doesn't work on the page I pictured. Once there's a variable on index.php, anycontent.php goes away for me. Is it not supposed to?

The plugin is pretty cool, but it doesn't seem that it will work for me. It uses the current theme and sets it in a table with a heading. It also appears that you would have to set it up for every single category seperately.

I would like it to look like the ad under the most viewed table like right here. (http://www.coincommunity.org/gallery/index.php) That is generated by anycontent.php.

But if you look right here, (http://www.coincommunity.org/gallery/index.php?cat=1) it doesn't show.

I'm confused as to how to get it there.

Title: Re: Help with inserting some extra content
Post by: Nibbler on July 25, 2006, 10:06:25 PM
That's an easy edit, index.php


                    case 'anycontent':
                        if ($cat == 0) {
                            ob_start();
                            /**
                             * Any php code or HTML can be put in this file and will be displayed
                             */
                            include('anycontent.php');
                            $anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
                            ob_end_clean();
                            echo ($anycontent);
                        }
                        flush();
                        break;
                }


Remove the condition


                    case 'anycontent':
                        //if ($cat == 0) {
                            ob_start();
                            /**
                             * Any php code or HTML can be put in this file and will be displayed
                             */
                            include('anycontent.php');
                            $anycontent = CPGPluginAPI::filter('anycontent',ob_get_contents());
                            ob_end_clean();
                            echo ($anycontent);
                       // }
                        flush();
                        break;
Title: Re: Help with inserting some extra content
Post by: bobby131313 on July 25, 2006, 10:21:07 PM


Yes! Thank you Nibbler! I really appreciate it!

Please mark solved.

Title: Re: Help with inserting some extra content
Post by: dtommy79 on August 08, 2006, 12:19:13 AM
Hi,

I have an easy question, but it's not too easy for me. I don't really know php.  I'd like to add an extra navigation button to my gallery a "Back to the main page" or something like that, but I don't know what to add to the theme.php

I use the hardwired theme.
I figured out that I have to add an extra something like this:

Quote<!-- BEGIN back_to_main_page -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftmy" src="themes/hardwired/images/buttonleftmy.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href='http://www.vegtelenhatarok.hu/news.php' title="{BACK_TO_MAIN_PAGE_TITLE}">{BACK_TO_MAIN_PAGE_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END back_to_main_page -->

I screwed up something at the title. If someone could correct it I'd be grateful. And another question. What do I have to add to the language file to translate this new button?

Many thanks.
Title: Re: Help with inserting some extra content
Post by: Joachim Müller on August 08, 2006, 07:19:27 AM
Don't try to hijack threads, especially since your question differs. Locking.
Title: Re: Help with inserting some extra content
Post by: Joachim Müller on August 08, 2006, 10:01:11 AM
PMing me with insults doesn't actually improve your situation. Read up the board rules (http://forum.coppermine-gallery.net/index.php?topic=22469.msg140696#msg140696). You might want to take a look at my sig as well. As you were not suppossed to hijack this unrelated thread, you should now do as you should have done in the first place: start a thread of your own.