Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Popup On CPG Home Page  (Read 4075 times)

0 Members and 1 Guest are viewing this topic.

Smexy

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • <3
    • Baka Renders
Popup On CPG Home Page
« 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 :)
Logged

Smexy

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • <3
    • Baka Renders
Re: Popup On CPG Home Page
« Reply #1 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Popup On CPG Home Page
« Reply #2 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
Logged

Smexy

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • <3
    • Baka Renders
Re: Popup On CPG Home Page
« Reply #3 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Popup On CPG Home Page
« Reply #4 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
Logged

Smexy

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • <3
    • Baka Renders
Re: Popup On CPG Home Page
« Reply #5 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.
« Last Edit: January 23, 2012, 11:20:41 am by Αndré »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Popup On CPG Home Page
« Reply #6 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
Logged

Smexy

  • Coppermine newbie
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 7
  • <3
    • Baka Renders
Re: Popup On CPG Home Page
« Reply #7 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
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 21 queries.