DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 20, 2018, 03:10:03 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Referral Link  (Read 4599 times)
0 Members and 1 Guest are viewing this topic.
Hooker
Guest
« on: August 17, 2004, 02:44:07 PM »

Hey,
Could someone help me get/make some php that will display peoples referral link when they click to edit there prefs so they can copy and paste it to there friends?

Thanks,
Hooker
Logged
Kendaer
Guest
« Reply #1 on: August 17, 2004, 02:52:14 PM »

In village.php, find
Code:
addnav("P?Preferences","prefs.php");
After it add
Code:
if (!file_exists("lodge.php")) {
    addnav("Refer a Friend", "referral.php");
}

In referral.php,
find
Code:
addnav("L?Return to the Lodge","lodge.php");

Replace it with
Code:
   if (file_exists("lodge.php")) {
        addnav("L?Return to the Lodge","lodge.php");
    } else {
        require_once("lib/villagenav.php");
        villagenav();
    }

These changes will be in 0.9.8-prerelease.4
Logged
Hooker
Guest
« Reply #2 on: August 17, 2004, 04:52:56 PM »

thanks for the help.. theres just one problem tho...
its not showing the entire route to the file, i keep lotgd in a folder called "lotgd" but in the referral link it seems to ignore the fact its in a folder and thinks its in the root? :/
Logged
Hooker
Guest
« Reply #3 on: August 17, 2004, 05:14:23 PM »

Heh i found the prob:
Quote
 ".getsetting("serverurl","http://".$_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']==80?"":":".$_SERVER['SERVER_PORT']).dirname($_SERVER['REQUEST_URI']))."referral.php?r=". rawurlencode($session['user']['login'])."`n`

Needs to be:

Quote

".getsetting("serverurl","http://".$_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']==80?"":":".$_SERVER['SERVER_PORT']).dirname($_SERVER['REQUEST_URI']))."/referral.php?r=". rawurlencode($session['user']['login'])."`n`

Atleast.. that made it work for me Tongue
Logged
Kendaer
Guest
« Reply #4 on: August 17, 2004, 05:51:31 PM »

Actually, you could also have your serverurl game setting mis-set.

Fix that too Smiley
Logged
Hooker
Guest
« Reply #5 on: August 17, 2004, 06:03:33 PM »

heh okay, thanks...

while were on the topic of asking for little things... is there anyway to auto-load the MOTD popup when people login?
Logged
Kendaer
Guest
« Reply #6 on: August 17, 2004, 06:08:01 PM »

The fix there is actually not quite correct and would break people who did correctly have their URL set.
I've put a proper fix into 0.9.8-prerelease 4's CVS codebase.

It's large enough (just because it's doing all that hokey _SERVER manipulation) that I figure it's just better to have you folks wait until 0.9.8-prerelease 4 comes out at the end of the week Smiley
Logged
SaucyWench
Mod God
*****
Offline Offline

Posts: 2238


I'm a good girl.


View Profile WWW
« Reply #7 on: August 18, 2004, 11:35:56 PM »

heh okay, thanks...

while were on the topic of asking for little things... is there anyway to auto-load the MOTD popup when people login?

It's already set to do that if they have not viewed it since the last change. Unfortunately most people have popup stoppers now. One way to get around that is a dynamic fly-in window using JavaScript. We talked about forcing it that way on Central, and I did do a mockup of it, but we kinda avoided implementing that because to some people they cause much irritation.

It's quite simple to do if you did want to force it. Just Google for "flyin window".
Logged

SaucyWench
Owner of GemDust.com and Darton City proudly hosted by LunarPages
Kendaer
Guest
« Reply #8 on: August 19, 2004, 12:40:46 AM »

Code for referral link fix the referral.php server info  there is a /  
missing before referral
Code:
"getsetting("serverurl","http://".$_SERVER['SERVER_NAME'].($_SERVER['SERVER_PORT']==80?"":":".$_SERVER['SERVER_PORT']).dirname($_SERVER['REQUEST_URI']))."[glow=red,2,300]/[/glow]referral.php?r=". rawurlencode($session['user']['login'])."`n


This is actually wrong if you are already at the root (ie, logd.dragoncat.net) you would end up with
http://logd.dragoncat.net//referral.php using your mod.

I have put a correct fix into 0.9.8-pre.4  I strongly suggest that people just wait on the fix for this one until then since it's not vital, nor 100% trivial.
Logged
phofire
Guest
« Reply #9 on: August 19, 2004, 05:42:29 AM »

It's already set to do that if they have not viewed it since the last change. Unfortunately most people have popup stoppers now. One way to get around that is a dynamic fly-in window using JavaScript. We talked about forcing it that way on Central, and I did do a mockup of it, but we kinda avoided implementing that because to some people they cause much irritation.

It's quite simple to do if you did want to force it. Just Google for "flyin window".

Is there a way to just make a new motd display a flashing .gif or something to annoysomeone into reading it?
Logged
Deimos
Guest
« Reply #10 on: August 21, 2004, 03:43:43 PM »

For the flashing gif idea, you could probably just html up the motd link to blink, from "new motd" look to "no new".
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
32 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search