GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Hide pop on home page (mechbunny) (https://gfy.com/showthread.php?t=1201490)

AnimeFevers 06-09-2016 10:21 AM

Hide pop on home page (mechbunny)
 
Wanting to pop something everywhere except the home page, pop will be added to the footer.

Anyone know what code I could use to do this?

I don't wanna bother mechbunny atm as they're pretty busy with their new script version.

$15 paxum for the help, beer monies.

Edit: my script version is a few years old as it has too man customization to upgrade.

Colmike9 06-09-2016 10:25 AM

<?php
$homepage = "/";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage!=$currentpage) {
include('popup.php');
}
?>

AnimeFevers 06-09-2016 10:29 AM

Quote:

Originally Posted by Colmike7 (Post 20951528)
<?php
$homepage = "/";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage!=$currentpage) {
include('popup.php');
}
?>

pop code I'm using will be <script src="popup.js"></script> how would I pop this using your code?

plaster 06-09-2016 10:35 AM

Just put it on the video template.

Colmike9 06-09-2016 10:36 AM

Quote:

Originally Posted by AnimeFevers (Post 20951537)
pop code I'm using will be <script src="popup.js"></script> how would I pop this using your code?

Good question, I suck at js.. :/

Coders: What if my php echoed the JS like echo'<script src="popup.js"></script>';, would that work?..

AnimeFevers 06-09-2016 10:36 AM

Quote:

Originally Posted by plaster (Post 20951552)
Just put it on the video template.

My script is a little different, there are many more pages than just index and videos, I used to do that.

Colmike9 06-09-2016 10:37 AM

Quote:

Originally Posted by plaster (Post 20951552)
Just put it on the video template.

But what about other non-video pages?


I'm sure someone that knows MB will have a better answer than me. :upsidedow

blackmonsters 06-09-2016 11:07 AM

<?php if (!checkNav('index')) { ?>

<script src="popup.js"></script>

<? } ?>


See sig for my hourly rate; minimum 1 hour.

:1orglaugh

AnimeFevers 06-09-2016 11:11 AM

Quote:

Originally Posted by blackmonsters (Post 20951654)
<?php if (!checkNav('index')) { ?>

<script src="popup.js"></script>

<? } ?>


See sig for my hourly rate; minimum 1 hour.

:1orglaugh

didn't work :( still pops on the home page.

blackmonsters 06-09-2016 11:12 AM

Quote:

Originally Posted by AnimeFevers (Post 20951660)
didn't work :( still pops on the home page.

which version of mechbunny?

blackmonsters 06-09-2016 11:18 AM

Quote:

Originally Posted by AnimeFevers (Post 20951660)
didn't work :( still pops on the home page.


Here you go :


<? if ($thisController == 'index' && !$_GET['mode'] && !$_GET['page']) { } else { ?>

<script src="popup.js"></script>

<? } ?>

AnimeFevers 06-09-2016 11:42 AM

Quote:

Originally Posted by blackmonsters (Post 20951687)
Here you go :


<? if ($thisController == 'index' && !$_GET['mode'] && !$_GET['page']) { } else { ?>

<script src="popup.js"></script>

<? } ?>

Still pops on the home page, the script is a pretty old version, couple years maybe.

Klen 06-09-2016 11:46 AM

Quote:

Originally Posted by AnimeFevers (Post 20951537)
pop code I'm using will be <script src="popup.js"></script> how would I pop this using your code?

Mike code should do the job, you should add this to popup.php
Code:

<?php
echo'
 <script src="popup.js"></script>';
?>


AnimeFevers 06-09-2016 11:50 AM

Quote:

Originally Posted by KlenTelaris (Post 20951759)
Mike code should do the job, you should add this to popup.php
Code:

<?php
echo'
 <script src="popup.js"></script>';
?>


Not sure what you mean tho, I don't have any popup.php file, my pop script is in a .js and I activate it using this code - <script src="popup.js"></script>

I think BlackMonsters has the right idea but it wont work on my script version, I'm sure there is a way tho, I remember hiding banners from certain pages ages ago.

Colmike9 06-09-2016 11:57 AM

<?php
$homepage = "/";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage!=$currentpage) {
echo'
<script src="popup.js"></script>';
}
?>


Try this, then. If it doesn't work, do a test and see if something other than / is the output for $currentpage then change $homepage = "/"; to the homepage value. That way you don't need another php file. :upsidedow

flashfire 06-09-2016 11:59 AM

an actual business thread on gfy!?!

AnimeFevers 06-09-2016 12:03 PM

Quote:

Originally Posted by Colmike7 (Post 20951789)
<?php
$homepage = "/";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage!=$currentpage) {
echo'
<script src="popup.js"></script>';
}
?>


Try this, then. If it doesn't work, do a test and see if something other than / is the output for $currentpage then change $homepage = "/"; to the homepage value. That way you don't need another php file. :upsidedow

oh sheet it worked, good job man, what's your paxum?

flashfire 06-09-2016 12:04 PM

nice...good to see webmasters helping each other

Colmike9 06-09-2016 12:06 PM

Quote:

Originally Posted by AnimeFevers (Post 20951804)
oh sheet it worked, good job man, what's your paxum?

I don't have Paxum. Don't worry about it, though, I'm just waking up and bored. :upsidedow

Glad it works!

Colmike9 06-09-2016 12:07 PM

Quote:

Originally Posted by flashfire (Post 20951813)
nice...good to see webmasters helping each other

I'm getting Deja Vu from the good ol days. :winkwink:

AnimeFevers 06-09-2016 12:08 PM

Quote:

Originally Posted by Colmike7 (Post 20951828)
I don't have Paxum. Don't worry about it, though, I'm just waking up and bored. :upsidedow

Glad it works!

Cheers buddy, good guy right here :thumbsup

Colmike9 06-09-2016 12:10 PM

Quote:

Originally Posted by AnimeFevers (Post 20951843)
Cheers buddy, good guy right here :thumbsup

Any time you need help, let me know. :upsidedow

Coup 06-09-2016 05:12 PM

10 PRINT "Hello World!"
20 GOTO 10

Colmike9 06-09-2016 06:50 PM

Quote:

Originally Posted by Coup (Post 20952527)
10 PRINT "Hello World!"
20 GOTO 10

5 X = 1
10 PRINT "I miss programming with line numbers"
20 X = X + 1
30 If X = 1000 THEN GOTO 100
40 GOTO 10
100 PRINT "I'm over it"
110 PRINT ":upsidedow"


All times are GMT -7. The time now is 08:01 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc