forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: Smexy on January 22, 2012, 11:30:16 am

Title: Popup On CPG Home Page
Post by: Smexy on January 22, 2012, 11:30:16 am
Hello CPG people,
I am in need of a bit of assistance if possible. Currently I am trying to integrate a popup on the home page of my Gallery and in this popup I would love to put a link to my Youtube channel , maybe an image so that visitors can see it and click it to go to it. My gallery gets a ton of hits and traffic and for me this would be a great opportunity to further promote my Youtube channel. You see I own a GFX Site and on my Youtube channel I make Tutorials and teach people to use Photoshop. It would be lovely to make my users more aware of these tutorials and further expand their capabilities.

So can anyone help me with this? My coding knowledge is scarce, I am not exactly a Coder myself. It would be great if someone can possibly indicate me a code and how to integrate it into CPG.

Another great thing would be a Plugin to do just this. I think that would greatly benefit CPG and further expand the possibilities of it.

Best regards
Darius.

I will await an answer :)
Title: Re: Popup On CPG Home Page
Post by: Smexy on January 22, 2012, 11:36:15 am
Excuse my double post, apparently I can't edit my previous post. I think I am blind and missed this popup plugin http://forum.coppermine-gallery.net/index.php/topic,31166.html  . Is it updated, does it work for 1.5? If not is there any way I can make it compatible? It is very important to me.

Regards
Title: Re: Popup On CPG Home Page
Post by: Αndré on January 22, 2012, 11:41:15 am
Where exactly and how often do you want to display that popup? Maybe this cpg1.5.x plugin already fits your needs: http://forum.coppermine-gallery.net/index.php/topic,65013.0.html
Title: Re: Popup On CPG Home Page
Post by: Smexy on January 22, 2012, 11:55:54 am
Thank you for the great speed of your reply haha.
Well, I want it to display here http://bakarenders.com/renders/ on the page with all the albums and statistics.
And if possible, I want it to last forever. Every time a member refreshes the home page. But only on the home page. Not in albums or when viewing full and/or intermediate images.
I know this might sound like an annoying move but it works as well as advertising goes.

Also I would like to thank you André for that topic link. That is exactly what I would want, but the only feature that I would like it to add to it is to simply make it show up every time a member refreshes or visits the address posted above. Also a code on how to implement an image into it would be really useful if I am not much of a bother.
Here is an example of the respective popup that I am referring too: http://i.imgur.com/WwTxg.png
That's the image that will be popping out on the gallery's home page.

Regards
Title: Re: Popup On CPG Home Page
Post by: Αndré on January 23, 2012, 10:01:19 am
only on the home page. Not in albums or when viewing full and/or intermediate images.
Open codebase.php, find
Code: [Select]
function firstvisithint_include_js()
{
    global $JS;
    if (!USER_ID && !GALLERY_ADMIN_MODE)
    {
            $JS['includes'][] = "./plugins/firstvisithint/js/firstvisithint.js";
    }
}
and replace with
Code: [Select]
function firstvisithint_include_js() {
    global $JS, $CPG_PHP_SELF;
    $superCage = Inspekt::makeSuperCage();
    if ($CPG_PHP_SELF == 'index.php' && !$superCage->get->keyExists('cat') && !GALLERY_ADMIN_MODE) {
        $JS['includes'][] = "./plugins/firstvisithint/js/firstvisithint.js";
    }
}


show up every time a member refreshes or visits the address posted above
Open js/firstvisithint.js, find
Code: [Select]
function fvh_init()
{
var fvh_numviews = fvh_readCookie('cpg_firstvisit');
if (!fvh_numviews)
{
  fvh_createCookie('cpg_firstvisit',1);
  GB_show('','index.php?file=firstvisithint/message');
    }
}
and replace with
Code: [Select]
function fvh_init() {
    GB_show('','index.php?file=firstvisithint/message');
}


how to implement an image into it would be really useful
Basic HTML question: http://www.w3schools.com/html/html_images.asp
Title: Re: Popup On CPG Home Page
Post by: Smexy on January 23, 2012, 10:46:44 am
Thank you Andre it works flawlessly. The support here is absolutely stunning.

There is one minor issue that keeps persisting tho. Here: http://i.imgur.com/4FQMJ.jpg [attached image to post]
Apparently the popup appears under the theme for some reason. Do you know perhaps what could be the error?
I assume it's a theme error that's causing this. Any ideas on how I can fix this?

Again, thank you for the amazing support. You guys are great. I really hope I am not much of a  bother haha.
Title: Re: Popup On CPG Home Page
Post by: Αndré on January 23, 2012, 11:39:53 am
Next time please attach your images to your post instead of hotlinking them. Additionally, you should update to the most recent version: cpg1.5.18

To fix your issue, make your theme compatible to cpg1.5.x, i.e. include at least that required CSS file: http://documentation.coppermine-gallery.net/en/theme_upgrade_14x-15x.htm#theme_convert_template_global_css
Title: Re: Popup On CPG Home Page
Post by: Smexy on January 23, 2012, 03:06:23 pm
Sorry for the picture linking.
Thank you for the amazing support Andre. I will upgrade my theme. Coppermine is awesome :) and I will always use it.
Keep up the good work CPG Staff

Topic Solved