Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues
Author Message
draxx
Involved
Involved



Joined: Nov 19, 2003
Posts: 282

PostPosted: Sat Mar 14, 2009 2:18 pm Reply with quote

Here when Raven posts a news article and you mouseover his name on the "posted by" link its for the site "ravenphpscripts.com".

When I mouseover my news as the site admin it shows a mailto:emailaddress

I have deleted just about everything I can find in theme.php and it still shows as Posted by Admin with a mailto: link.

Any idea where I can tell it to stop showing the email address?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Mar 14, 2009 3:27 pm Reply with quote

Are you using the fisubice theme that ships with RN v2.30.01? That's code I hacked back in 2005 Wink
 
View user's profile Send private message
draxx







PostPosted: Sat Mar 14, 2009 3:36 pm Reply with quote

Yep I am using that theme and I tried a few others that also seem to do it.
In the theme I see your comments: You can see where I tried to stick the URL in instead of the modules.php=userinfo stuff

Code:


/************************************************************/
/* Function themearticle()                                  */
/*                                                          */
/* This function format the stories on the story page, when */
/* you click on that 'Read More...' link in the home        */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext, $notes) {  //montego - added $notes for RavenNuke
    global $admin, $sid, $tipath;
    $thetext = '<div>'.$thetext.'</div>';
    $posted = _POSTEDON.' '.$datetime.' '._BY.' ';
    $posted .= get_author($aid);
    if (!empty($notes)) {
        $notes = '<br /><b>'._NOTE.'</b> <div>'.$notes.'</div>';
    } else {
        $notes = '';
    }
    if ($aid == $informant) {
        $content = $thetext.$notes;
    } else {
        if(!empty($informant)) {
            global $admin, $user;
            if (is_user($user)||is_admin($admin)) $content = '<a href="givemealink.com"><i>'.$informant.'</i></a> ';
            else $content = $informant.' ';//Raven 10/16/2005
        } else {
            $content = $anonymous.' ';
        }
        $content .= '<i>'._WRITES.'</i> <div>'.$thetext.'</div>'.$notes;
    }
    $tmpl_file = 'themes/fisubice/story_page.html';
    $thefile = implode('', file($tmpl_file));
    $thefile = addslashes($thefile);
//  $thefile = '\$r_file="'.$thefile.'";';
    $thefile = '$r_file="'."$thefile".'";';
    eval($thefile);
    print $r_file;
}
 
JoAnne
Worker
Worker



Joined: Oct 18, 2005
Posts: 127
Location: NYC

PostPosted: Sat Mar 14, 2009 4:32 pm Reply with quote

draxx wrote:
Here when Raven posts a news article and you mouseover his name on the "posted by" link its for the site "ravenphpscripts.com".

When I mouseover my news as the site admin it shows a mailto:emailaddress

I have deleted just about everything I can find in theme.php and it still shows as Posted by Admin with a mailto: link.

Any idea where I can tell it to stop showing the email address?


The same thing is occurring on my updated v2.30.01 sites Sad

I didn't realize it until you brought it to my attention Shocked
 
View user's profile Send private message Visit poster's website
j4rdin
Worker
Worker



Joined: May 26, 2006
Posts: 153

PostPosted: Sat Mar 14, 2009 4:45 pm Reply with quote

Raven wrote:
Are you using the fisubice theme that ships with RN v2.30.01? That's code I hacked back in 2005 Wink


Just found this post. I'm using the RavenIce theme and I've just checked on posts made since my upgrade to RN2.30.01 and before the upgrade.

On the main site in the route directory all is ok, shown the website when mousing over the posted by. But on my subdomain all posts show the mailto: as the previous poster has noticed. Did RavenIce get modified in the same way as Fisubice was?

John
 
View user's profile Send private message
Raven







PostPosted: Sat Mar 14, 2009 7:28 pm Reply with quote

We will look into this and post back with our findings. Thanks.
 
draxx







PostPosted: Sat Mar 14, 2009 9:21 pm Reply with quote

Okay if its any help I have searched for "mailto"

I have looked in the news language file
and the news module index.php
and the template language file
and the all the .html parts of the template
oh and the .css file
and the main language file

and I have replaced.. well first I tried just removing them ... all links in theme.php that included or referenced $aid and $informant.

Thats when I popped another grey hair and decided to come here Smile

Thanks Raven! Hope this helps.
 
Raven







PostPosted: Sat Mar 14, 2009 10:18 pm Reply with quote

It al helps - Thanks. We will get to it as soon as we can.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Mar 17, 2009 6:55 am Reply with quote

I had even removed the reference to a person's website URL in the news comments recently as it was just an invitation to spam news article comments. Might be another one to check. That code is in modules/News/comments.php

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
draxx







PostPosted: Wed Mar 18, 2009 10:48 am Reply with quote

modules/news/comments.php - nothing I could see here was doing it.

I really want rid of that email address. I have refrained from posting any news until ....
 
Raven







PostPosted: Wed Mar 18, 2009 11:25 am Reply with quote

Look in mainfile.php for this function

Code:
function get_author($aid) {

    global $prefix, $db;
    static $users;
    if (isset($users[$aid]) AND is_array($users[$aid])) {
        $row = $users[$aid];
    } else {
        $sql = 'SELECT url, email FROM '.$prefix.'_authors WHERE aid=\''.$aid.'\'';
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        $users[$aid] = $row;
    }
    $aidurl = stripslashes($row['url']);
    $aidmail = encode_mail(stripslashes($row['email']));
    if (!empty($aidurl) && isset($aidurl) && $aidurl != 'http://') {
        $aid = '<a href="'.$aidurl.'">'.$aid.'</a>';
    } elseif (!empty($aidmail) && isset($aidmail)) {
        $aid = '<a href="mailto:'.$aidmail.'">'.$aid.'</a>';
    } else {
        $aid = $aid;
    }
    return $aid;
}
 
draxx







PostPosted: Wed Mar 18, 2009 12:08 pm Reply with quote

Yep thats it. Dident think to look there. Embarassed Thank you! Very Happy
 
Raven







PostPosted: Wed Mar 18, 2009 2:45 pm Reply with quote

RavensScripts
 
JoAnne







PostPosted: Wed Mar 18, 2009 4:39 pm Reply with quote

Raven wrote:
RavensScripts


Do we remove that code or just comment it out?

Thanks

JoAnne
 
draxx







PostPosted: Wed Mar 18, 2009 4:50 pm Reply with quote

Find the red line:

$aidurl = stripslashes($row['url']);
$aidmail = encode_mail(stripslashes($row['email']));
if (!empty($aidurl) && isset($aidurl) && $aidurl != 'http://') {
$aid = '<a href="'.$aidurl.'">'.$aid.'</a>';
} elseif (!empty($aidmail) && isset($aidmail)) {
$aid = '<a href="mailto:'.$aidmail.'">'.$aid.'</a>';
} else {
$aid = $aid;
}
return $aid;
}

Change that line to this
Code:


     $aid = '<a href="index.html">'.$aid.'</a>';

and the link over the name will refer them to the homepage ... kinda like what raven does... but I'm sure you could alter some more code and have it refer to the admins profile or whoever.
 
JoAnne







PostPosted: Wed Mar 18, 2009 5:40 pm Reply with quote

draxx wrote:

and the link over the name will refer them to the homepage ... kinda like what raven does... but I'm sure you could alter some more code and have it refer to the admins profile or whoever.


Homepage is so much better than email!

Thank you so much Raven and draxx!

JoAnne
 
j4rdin







PostPosted: Thu Mar 19, 2009 11:11 am Reply with quote

Raven wrote:
Look in mainfile.php for this function


Thanks Raven, so much easier than messing around with the themes.

John Very Happy
 
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Mon Sep 14, 2009 8:41 am Reply with quote

Just added:
$aid = '<a href="/">'.$aid.'</a>';

Maybe this should be a sticky. Smile
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©