Mod: new_out *new* version 2.0

Various mods to change or add features.

Mod: new_out *new* version 2.0

Postby grishnak » 2007-10-11 05:35 am

I made this mod because I was could not get the outs to register no matter what I did so I basically rewrote the code, eliminating the javascript.

(see my post here)
http://www.aardvarktopsitesphp.com/forums/viewtopic.php?t=7573

I have fixed this mod from the first version to be more consistent with the original code. I removed the session variables and the new_out.php file I created. In tead the mod now consists of a few small changes.

In the file in.php I changed this:
Code: Select all
if (isset($FORM['a']) && $FORM['a'] == 'out')
       {
          exit()
          }

with this:
Code: Select all
if (isset($FORM['a']) && $FORM['a'] == 'out')
       {
          return 0;
          /****
          Removed exit() as it was causing a kill of the index.php page
          load at this point if a=out. Replaced with a 0 return value instead.
          ****/
          }


and in the out.php file I changed this:
Code: Select all
if(!$FORM['go'])
    {
       exit("this is the exit");
       }
   
    else
{
$this->record($username,'out');
    list($url) = $DB->fetch("SELECT url FROM {$CONF['sql_prefix']}_sites WHERE username = '{$username}'", __FILE__, __LINE__);
    header("Location: {$url}");
    die("this is where it died");
}

to this:
Code: Select all
$this->record($username,'out');
    list($url) = $DB->fetch("SELECT url FROM {$CONF['sql_prefix']}_sites WHERE username = '{$username}'", __FILE__, __LINE__);
    header("Location: {$url}");
    die("this is where it died");


The other changes are all to the html files changing any instances of out links from the javascript version to the non JS version. Please note if you previously installed v1.1 you should replace your index.php from that mod with the original version .
The changes in the link take this code:
Code: Select all
<a href="{$url}" onclick="out('{$username}');"></a>

with:
Code: Select all
<a href="{$list_url}/index.php?a=out&amp;u={$username}" title ="{$url}"></a>

The title tag displays the URL of the site that the out link is associated with with a tooltip "onhover" type of effect.

The mod 2.0 is compatible with the Javascript links and should work with either but even with the changes I made, the out hits still do not seem to record using the javascript while browsing with firefox.

The mod file can be downloaded form here
http://games.topnet100.com/mod_newout_v2.0.zip

included in the mod are the minor fixes to make the pages XHTML compliant.

Let me know what you all think.
Last edited by grishnak on 2008-01-01 05:47 am, edited 2 times in total.
Grishnak

Maker of sites.

eq2markets.com
games.topnet100.com
grishnak
Advanced Member
 
Posts: 30
Joined: 2007-10-02 01:22 pm

Postby pc_freak » 2007-11-10 11:37 pm

Hi grishnak ,

I tried to install your mod on my local host for the site that i am working on but somehow i kept getting the google result that you included into the new_out.php file :P

I believe that i've made the changes correctly into the html files that you have uploaded on the zip file(as i am working on a new template with some extras in it and couldn't just replace my files with those that you added)
What i want to ask you is regarding the
Code: Select all
/****
After you rename the my_include.inc file change this include statement to point to it.
****/
that i read into the new_out.php file :P
Where exactly is taht my_include.inc file ? :P
Image
pc_freak
Member
 
Posts: 28
Joined: 2006-08-04 11:12 pm

Postby grishnak » 2007-11-11 05:54 pm

you can ignore that line of comment. It refers to how I initially had the mod structured but I changed course and removed the .inc file the comment refers to. I should have removed the comment as well.

As far as getting the Google result are you getting these results when you try to click "out" on a site in your list? The code is designed to prevent direct access of the new_out.php file. in order to process their has to be a get method variable set to out $GET['a']='out' , the page needs to be called by a referring page. If both those criteria are met than the cod checks to see what site sent the request from and if it is the same as the site list host then the "out" is recorded and the browser sent to the right site.

If none of those conditions are met then the visitor is sent to the Google address ( or what ever you change the address to.
Grishnak

Maker of sites.

eq2markets.com
games.topnet100.com
grishnak
Advanced Member
 
Posts: 30
Joined: 2007-10-02 01:22 pm

Postby pc_freak » 2007-11-15 11:51 am

Yes i get the google result when i click on a member's banner /link on my list or from member's stat page.
I am not sure if i get your point correctly about the reffering page .. is there any other way to remove that second criteria? and let only the first one that you said?
Image
pc_freak
Member
 
Posts: 28
Joined: 2006-08-04 11:12 pm

Re: Mod: new_out

Postby pc_freak » 2007-12-27 07:35 am

Any help on that? i keep getting the google search and doesn't count out the hits :cry:
I've tested on the default skin and still nothing :S
Image
pc_freak
Member
 
Posts: 28
Joined: 2006-08-04 11:12 pm

Re: Mod: new_out

Postby grishnak » 2007-12-29 04:08 pm

When you send me the link to the topsite list that you are having an issue with I will take a look at it. I don't know why it would not be working. If you have heavily modified your site it is possible that the code is not working with your other mods but until I can see the code in action it is going to be impossible to help you.
Grishnak

Maker of sites.

eq2markets.com
games.topnet100.com
grishnak
Advanced Member
 
Posts: 30
Joined: 2007-10-02 01:22 pm

Re: Mod: new_out *new* version 2.0

Postby grishnak » 2008-01-01 05:48 am

Try the new version and see if that works better.
Grishnak

Maker of sites.

eq2markets.com
games.topnet100.com
grishnak
Advanced Member
 
Posts: 30
Joined: 2007-10-02 01:22 pm

Re: Mod: new_out *new* version 2.0

Postby pc_freak » 2008-01-01 11:39 pm

Yea!! it works like a charm :D

Thank you so much grishnak you helped me alot with that mate :mrgreen:
Image
pc_freak
Member
 
Posts: 28
Joined: 2006-08-04 11:12 pm

Re: Mod: new_out *new* version 2.0

Postby grishnak » 2008-05-11 11:21 am

bump
Grishnak

Maker of sites.

eq2markets.com
games.topnet100.com
grishnak
Advanced Member
 
Posts: 30
Joined: 2007-10-02 01:22 pm

Re: Mod: new_out *new* version 2.0

Postby Haruspex » 2008-07-10 10:02 am

Where is the "new_out.php" file? When I install your mod and try to click a listed site it says new_out.php can not be found.
Haruspex
Newbie
 
Posts: 4
Joined: 2008-07-08 05:47 pm

Re: Mod: new_out *new* version 2.0

Postby Haruspex » 2008-07-28 05:49 am

bump
Haruspex
Newbie
 
Posts: 4
Joined: 2008-07-08 05:47 pm

Re: Mod: new_out *new* version 2.0

Postby toolman » 2009-07-27 08:22 am

Hi there,

I have the same problem as Haruspex - the new_out.php file cannot be found when the links are clicked.
Does anyone know where this file is or what should be in the file?

Thanks
toolman
Newbie
 
Posts: 4
Joined: 2009-07-15 02:46 pm

Re: Mod: new_out *new* version 2.0

Postby Basti » 2009-07-27 09:10 am

Try to follow the guideline posted in post #1, so applying the changes by hand, instead of downloading the zip.
If you dont get, let me know via msn
Basti
Advanced Member
 
Posts: 1619
Joined: 2004-06-20 06:17 pm
Location: Germany

Re: Mod: new_out *new* version 2.0

Postby grishnak » 2009-07-28 03:59 am

I apologize for not responding earlier as I missed the notice of posts to this thread. Those errors you are seeing are leftover from a prior version of this mod which should have been edited out of the html files but they slipped through my edit. There is no new_out file nor should there be one. I have fixed the errors, rezipped the files, and reuploaded the zip file. Please redownload the zip and try again. My apologies for the errors.
Grishnak

Maker of sites.

eq2markets.com
games.topnet100.com
grishnak
Advanced Member
 
Posts: 30
Joined: 2007-10-02 01:22 pm

Re: Mod: new_out *new* version 2.0

Postby toolman » 2009-08-01 07:32 am

Thank you very much. It seemed to fix the new_out.php problem, but it is still not counting the hits out. Unless, how long does it take to register and update the count, as I refreshed straight after and it still says 0

Any ideas?
toolman
Newbie
 
Posts: 4
Joined: 2009-07-15 02:46 pm

Next

Return to Mods

Who is online

Users browsing this forum: No registered users and 1 guest

cron