Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Steptoe
Involved
Involved



Joined: Oct 09, 2004
Posts: 293

PostPosted: Wed Oct 12, 2005 7:15 pm Reply with quote

There has been posts re SEOing links in forums, much talk no do, so I am bumbling my way thru using
http://www.able2know.com/forums/about15132.html
I think it is called porting lol
Some of the stuff works, other stuff nuke doesnt have, couple dont, and I want to improve on some....
like links on last poster and moderators only show when logged in. The above removes mods and links to poster details perminently.
I tryed if (is_user($user)) as u see is still in code below that does same as removing all the href stuff, perminent removes the link..also tryied
<!-- BEGIN switch_user_logged_in --> and <!-- END switch_user_logged_in --> that just screws up
If I can get this to work in the forum index file, I can the apply to the other files and apply to author, and moderator detail links....I think lol

Code:
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) :

                                                                   '<if (is_user($user))a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' .$forum_data[$j]['username'] . '</a> ';

_________________
My Spelling is NOT incorrect, it's Creative 
View user's profile Send private message
Steptoe







PostPosted: Sat Oct 15, 2005 3:03 pm Reply with quote

Bump.
What gives?
I have 3 blocks and the above to finish our site
Have I upset everyone somewhere, and they are too afraid to say so?
Are my concepts stupid and no one is prepared to say so?
Do the coders what just take them and use in there own releases? hey go for it I would just like it working on our site.
Or is it because I don't donate?..Well as u will see from our site it is non profit, and relates to conservation... we are not high income, u may also notice that, what we do have is spent on breeding endangered species, at a cost of 1000s of dollars, we don't sell our birds, we dont derive any income WHAT SO EVER from it, they are given away to conservation for free...So generations to come can also enjoy them......Sort of like open source coding.
Instead I do my best to return a little help and support back to the community.

Over the last 6 to 9 months, I get "sure send them thru" "yes I can do that " "I will look into next week" thats it....and this is from a lot of very well known names and coders thru out the community.
Then there was one answer I got..." coders don't like messing with others coders work....and there market is swamped with blocks that do that" the latter, could apply to the use info, but they don't have the new concepts, and as far as the rest goes, nope there isn't.
OR is it because of like 1 reply came back from a 'respected' site' "u should have posted here 1st" Well I have no idea who gets along with who, and who doesn't, and I'm not really bloody interested in the politics.
I can only ASS-U-ME it hast to be one or several of the above.
So what gives? this open source development or not?

Im not going to spam by bumping all the other requests. thats unethical so heres the links
http://www.ravenphpscripts.com/posts6130-highlight-.html
http://www.ravenphpscripts.com/posts6960-highlight-.html
http://www.ravenphpscripts.com/posts6846-highlight-.html
http://www.ravenphpscripts.com/posts7043-highlight-.html

This is no reflection on this site, its a reflection on around 10 top nuke sites
A disappointed Steps
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Oct 16, 2005 2:50 am Reply with quote

I cannot, and do not, look at every post here. There are a handful of dedicated people, most of which also have full time jobs, who help the best they can. I work also on paying client's contract jobs. If I have to choose between helping for free and working on earning a few kaching!$, guess what? I have to eat, pay taxes, buy gas, etc. I have no idea who has told you what or why they did or they didn't. I think you are operating under a HUGE misconception my friend. Open source development has never meant free from cost and time. It simply means the code is open source. I can assure you of this, however. This site, by volume, responds to more posts than most others. That's one of the main reasons it has grown as it has.

I was not aware that you have so many that have not been answered. I know that I responded to a couple and then just lost track as I am very busy with many projects. That's not an excuse but more a statement of fact. I'm not aware of any issues with you, here, or elsewhere, so I doubt that there's a conspiracy out there Smile The fact that you have 114 posts would lead me to believe that you have been helped here in the past, or not? My point being that sometimes things aren't what they may seem. Sometimes stuff happens.
 
View user's profile Send private message
Raven







PostPosted: Sun Oct 16, 2005 3:45 am Reply with quote

Here is the solution I would use. Edit modules/Forums/viewforum.php.
Find similar code like
Code:
                $topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';

                $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );

                $topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';

                $first_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']);

                $last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);

                $last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>';

                $last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';

INSERT AFTER
Code:
// Added by Raven 10/16/2005 for better SEO

                if (!(is_admin($admin)||is_user($user))) {
                   $topic_author = strip_tags($topic_author);
                   $last_post_author = strip_tags($last_post_author);
                   $last_post_url = strip_tags($last_post_url);
                }
// Added by Raven 10/16/2005 for better SEO


That will allow the links for users and admins.


Last edited by Raven on Sun Oct 16, 2005 4:01 am; edited 1 time in total 
Raven







PostPosted: Sun Oct 16, 2005 3:59 am Reply with quote

You will also want to do a similar edit in modules/Forums/index.php.
Find similar code like
Code:
                                                                $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

INSERT AFTER
Code:
// Added by Raven 10/16/2005 for better SEO

                if (!(is_admin($admin)||is_user($user))) {
                   $last_post = strip_tags($last_post,'<br>');
                }
// Added by Raven 10/16/2005 for better SEO
 
Steptoe







PostPosted: Sun Oct 16, 2005 4:09 am Reply with quote

The fine print lol
Quote:

Over the last 6 to 9 months, I get "sure send them thru" "yes I can do that " "I will look into next week" thats it....and this is from a lot of very well known names and coders thru out the community.

I do not say, or infer, that I speak of u, those here, or this site. I do know that many, most of them do cruise thru here every so often.
Quote:

The fact that you have 114 posts would lead me to believe that you have been helped here in the past, or not?

Yes and elseware over the last 12 months, little bits here and there. a lot are where I have helped out where I can to.
And Ido appreciate what I have had, u will find a simlar posts my "1st Birthday and Thanks" at sites that have helped.
 
Steptoe







PostPosted: Sun Oct 16, 2005 4:14 am Reply with quote

oops crossed posting lol Its nearly midnight Sunday right now, will get ito the above code tomorrow sometime , will let u know how it goes.
Im certain this will help others also.
cheers thanks
 
Steptoe







PostPosted: Sun Oct 16, 2005 7:24 pm Reply with quote

Cool...Now this is what I have found so far...and the rest I cant find.
Quote:

********************************************************************
SOE and MEMBER Details/privacy Hack with the help of those mentioned below
for Default Sub Silver theme on php nuke 7.5 with GT 4a installed.
Most likely compatable with most other versions but not tested
*****************************************************************************************************
Make 'LAST POST ICON' in Forum index to show ONLY when logged in (Steptoe)

\modules\Forums\index.php
[ FIND about line 414 ]

$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

{ADD BEFORE)

if (is_user($user))

********************************************************************************************************
Remove PERSONAL CONTACTS (Profile, IM, PM, AIM, EMail) to show ONLY when logged in (Nuke Post I found long time ago, orginal author unknown)
It only should be used by those logged in.

\modules\Forums\viewtopic.php
[ FIND about line 1015]

if ( $poster_id != ANONYMOUS )

[ REPLACE WITH ]

if ( $poster_id != ANONYMOUS && $userdata['session_logged_in'] )

*****************************************************************************************************************
Remove link of USERNAME on the LAST POST in search (Craven de Kere http://www.able2know.com/)
NOTE: this removes USERNAME of LAST POSTlink in search for both logged in and not logged in...I see no piont having when logged in.
Besides I dont know how to do that lol (Steptoe)

modules\Forums\search.php
[ FIND about line 1234 ]

$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $searchset[$i]['topic_last_post_id']) . '#' . $searchset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';

[ In Front of add // ]

**************************************************************************************************************
Unlink the USERNAME of AUTHOR on search (Craven de Kere http://www.able2know.com/)
NOTE: this removes USERNAME of AUTHOR link in search for both logged in and not logged in...I see no piont having when logged in.
Besides I dont know how to do that lol (Steptoe)

modules\Forums\search.php
[ FIND about line 1223]

$topic_author = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $searchset[$i]['user_id']) . '">' : '';

[ REPLACE WITH ]

$topic_author = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '' : '';

******************************************************************************************************
Unlink the USERNAME of the LAST POST on Forum index to show ONLY when logged in (By Raven http://www.ravenphpscripts.com)

\modules\Forums\index.php
[ FIND on line about line 412]

if ( $forum_data[$j]['forum_last_post_id'] )
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . '<br />';
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' .$forum_data[$j]['username'] . '</a> ';
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

[INSERT AFTER]

// Added by Raven 10/16/2005 for better SEO
if (!(is_admin($admin)||is_user($user))) {
$last_post = strip_tags($last_post,'<br>');
}
// Added by Raven 10/16/2005 for better SEO

**********************************************************************************************

Unlink the USERNAME of the LAST POST on viewforum to show ONLY when logged in (By Raven http://www.ravenphpscripts.com)

\modules\Forums\viewforum.php [ FIND about line 686 ]

$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );

$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';

$first_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['topic_time'], $board_config['board_timezone']);

$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);

$last_post_author = ( $topic_rowset[$i]['id2'] == ANONYMOUS ) ? ( ($topic_rowset[$i]['post_username2'] != '' ) ? $topic_rowset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $topic_rowset[$i]['id2']) . '">' . $topic_rowset[$i]['user2'] . '</a>';

$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';

[INSERT AFTER]
// Added by Raven 10/16/2005 for better SEO
if (!(is_admin($admin)||is_user($user))) {
$topic_author = strip_tags($topic_author);
$last_post_author = strip_tags($last_post_author);
$last_post_url = strip_tags($last_post_url);
}
// Added by Raven 10/16/2005 for better SEO


**********************************************************************************************
Unlink the USERNAME of AUTHOR on viewforum to show ONLY when logged in (By Raven http://www.ravenphpscripts.com)

\modules\Forums\viewforum.php [ FIND about line 674]

$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $topic_rowset[$i]['user_id']) . '">' : '';
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['post_username'] != '' ) ? $topic_rowset[$i]['post_username'] : $lang['Guest'] );
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : '';

[INSERT AFTER]

// Added by Raven 10/16/2005 for better SEO
if (!(is_admin($admin)||is_user($user))) {
$topic_author = strip_tags($topic_author);
$last_post_author = strip_tags($last_post_author);
$last_post_url = strip_tags($last_post_url);
}
// Added by Raven 10/16/2005 for better SEO

***************************************************************************************************
Unlink the USERNAME of the LAST POST on search (Craven de Kere http://www.able2know.com/)

modules\Forums\search.php [ FIND about line 1234 ]

$last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $searchset[$i]['topic_last_post_id']) . '#' . $searchset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';

[ In Front of add ]

//

**************************************************************************************************************
Unlink the USERNAME of AUTHOR on search (Craven de Kere http://www.able2know.com/)

modules\Forums\search.php [ FIND about line 1223]

$topic_author = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $searchset[$i]['user_id']) . '">' : '';


[ REPLACE WITH ]

$topic_author = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? '' : '';

**************************************************************************************************
Remove MODERATORS and USER VIEWING at top of forums... veiwable by loggedin only (Steptoe)

\themes\DeepBlue\forums\viewforum_body.tpl

[ FIND IN a line about line 6 ]

<b>{L_MODERATOR}: {MODERATORS}<br /><br />{LOGGED_IN_USER_LIST}</b></span></td>

[ADD BEFORE]

<!-- BEGIN switch_user_logged_in -->

[ADD AFTER]

<!-- END switch_user_logged_in -->

*********************************************************************************************************
REMOVE GROUPS, PROFILE icons/links at top of forums... visible only when logged on (Steptoe)
\themes\DeepBlue\forums\overall_header.tpl about line

[FIND IN about LINE 234]

<a href="{U_GROUP_CP}" class="mainmenu"><img src="themes/DeepBlue/forums/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="themes/DeepBlue/forums/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp;

[ADD BEFORE]

<!-- BEGIN switch_user_logged_in -->

[ADD AFTER]

<!-- END switch_user_logged_in -->


***********************************************************************************************************************
Remove QUOTE BUTTON unless logged in (Steptoe)

modules/forums/viewtopic.php [FIND line about 1101]

$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>';

[BEFORE add]

if (is_user($user))

*******************************************************************************************************************
The 'MARK ALL TOPICS READ' visible to show ONLY when logged in at BOTTOM of forums (Steptoe)
It only should be used by those logged in.

\themes\DeepBlue\forums\index_body.tpl

[ FIND about line 44]

<td align="left"><span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span></td>

[ADD BEFORE ]
<!-- BEGIN switch_user_logged_in -->

[ADD AFTER]

<!-- END switch_user_logged_in -->

***********************************************************************************************
The 'MARK ALL TOPICS READ' visible to show ONLY when logged in at TOP of forums (Steptoe)
It only should be used by those logged in.

\themes\DeepBlue\forums\viewforum_body.tpl

[ FIND about line 12 ]

<td align="right" valign="bottom" class="nav" nowrap="nowrap"><span class="gensmall"><a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></span></td>

[ADD BEFORE ]
<!-- BEGIN switch_user_logged_in -->

[ADD AFTER]

<!-- END switch_user_logged_in -->

***********************************************************************************************
DELETE bottom STATS BOX at bottom of forums (Steptoe)

\themes\deepblue\Forums\index_body.tpl

[ FIND about line 49]

<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" rowspan="2"><img src="themes/DeepBlue/forums/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
</td>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
</tr>
</table>

<table width="100%" cellpadding="1" cellspacing="1" border="0">
<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</table>

[Delete]

**********************************************************************************************
Remove the LOG ON BOX At the bottom of Forums for logged on and not logged on (Steptoe)
This tends to be 'buggy' anyway and loggin is at the top or on user_info if as a left side block

\themes\deepblue\Forums\index_body.tpl

[ FIND about line 68]

<form method="post" action="{S_LOGIN_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><a name="login"></a><span class="cattitle">{L_LOGIN_LOGOUT}</span></td>
</tr>
<tr>
<td class="row1" align="center" valign="middle" height="28"><span class="gensmall">{L_USERNAME}:
<input class="post" type="text" name="username" size="10" />
&nbsp;&nbsp;&nbsp;{L_PASSWORD}:
<input class="post" type="password" name="password" size="10" />
&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN}
<input class="text" type="checkbox" name="autologin" />
&nbsp;&nbsp;&nbsp;
<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
</span> </td>
</tr>
</table>
</form>

[Delete]

****************************************************************************************************
WORK in PROGRESS Below
*****************************************************************************************************
Make the PREVIOUS and NEXT TOPIC links to show ONLY when logged in

\modules\Forums\templates\subSilver\viewtopic_body.tpl ??
[ FIND about line 20]

<span class="nav"><a href="{U_VIEW_OLDER_TOPIC}" class="nav">{L_VIEW_PREVIOUS_TOPIC}</a> :: <a href="{U_VIEW_NEWER_TOPIC}" class="nav">{L_VIEW_NEXT_TOPIC}</a> &nbsp;</span>

[ REPLACE WITH ]

WORK in PROGRESS ???????????????????

*********************************************************************
NEW TOPIC and POST REPLY to show ONLY when logged in OR if permissions are set that they should be visible as Guest
Note:It seems auto Spamers will only hit posts that have reply to permissions enabled to guests, they do not hit New Topic
It is then strongly suggested if guests are to have permission to post, then they can make new topic,
they will not be able reply, but will have to regist. as a member to do so.
Therefore the reply to button could then be made visible ONLY to logged on.

\modules\Forums\ ??????????

[ FIND about line ??]

?????????????????

[ REPLACE WITH ]

WORK in PROGRESS ????????????????

********************************************************************


Last edited by Steptoe on Mon Oct 24, 2005 9:05 pm; edited 6 times in total 
Raven







PostPosted: Sun Oct 16, 2005 7:41 pm Reply with quote

Well, you have a good head-start now. Happy hunting! I would recommend that you allow for is_admin($admin) also.
 
Steptoe







PostPosted: Sun Oct 16, 2005 7:52 pm Reply with quote

Remeber Im no coder..its just hit in miss try see if works...stuff like _admin($admin) I have no idea lol
I have tried alsorts of stuff on the rest over the last couple weeks and have hit a brick wall.
When finished I think this would be of use to many, possibly worth going in to down loads?

Maybe some others will pass thru add stuff to it over the next few days...fingers crossed tight and going white lol
That is as good as I can get
 
Raven







PostPosted: Sun Oct 16, 2005 8:02 pm Reply with quote

I have been implementing that code all over my site and not only in forums but other modules too. The more I read up on it the more I agreed with it. For the search, edit modules/Forums/search.php.
FIND
Code:
                                $last_post_url = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $searchset[$i]['topic_last_post_id']) . '#' . $searchset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';


                                $template->assign_block_vars('searchresults', array(
                                        'FORUM_NAME' => $searchset[$i]['forum_name'],
                                        'FORUM_ID' => $forum_id,
                                        'TOPIC_ID' => $topic_id,

BEFORE $template->assign_block_vars ADD
Code:
// Added by Raven 10/16/2005 for better SEO

                if (!(is_admin($admin)||is_user($user))) {
                   $topic_author = strip_tags($topic_author,'<br>');
                   $first_post_time = strip_tags($first_post_time,'<br>');
                   $last_post_time = strip_tags($last_post_time,'<br>');
                   $last_post_author = strip_tags($last_post_author,'<br>');
                   $last_post_url = strip_tags($last_post_url,'<br>');
                }
// Added by Raven 10/16/2005 for better SEO
 
Steptoe







PostPosted: Mon Oct 17, 2005 3:32 am Reply with quote

U have an edit button...can u edit where it is meant to go in 'list' post 4 up?
That seach part I did not know what I was doing, I just copy pasted stuff and it worked or didnt, the stuff in there works but I have no idea if it is a good way of doing it or a better way.
Quote:

The more I read up on it the more I agreed with it.


Thanks for that, I maybe new but I do google /read and least know what should be done...just havnt a clue how to lol
Quote:

I have been implementing that code all over my site and not only in forums but other modules too.

I think user info should be done..new members list and members on line links
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Mon Oct 17, 2005 4:42 am Reply with quote

While yout at it, hehehe....
You might want to look at 'Comment' links - do we really want none registered users to have the ability to post lots of spam in Comments?
Being registered wont stop that eother but it does give the webmaster a starting point for tracing and blocking them.
 
View user's profile Send private message Send e-mail
Steptoe







PostPosted: Mon Oct 17, 2005 5:03 am Reply with quote

Yep News...forgot that one, did it a while back before I got in to this mess lol. Get around that I disabled comments in news.... have a look around at most sites (non nuke) and its very rarely used... And the same was for ours, 2 comments in a yr
I also removed the name and link to the news poster on ours, ppl submit, I approve, if it needs a name I put it in the txt.
Couldnt figure the code to do that...so there more than one way to skin a cat lol.
And lastest forum blocks.. I figured that out a while back also, will see if I can find that one tomorrow and put in the list above.

Another side benifit removing the links, it is my understanding that the pages are smaller without all the links and therefore would load a bit faster...how much and what effect in real terms I dont know..it all adds up thu.
 
Steptoe







PostPosted: Mon Oct 17, 2005 3:05 pm Reply with quote

To remove link to posters details in a latest posts forum block
( block-Forums_Scroll.php)

Find a line like this
Code:
$content .= "<img src=\"themes/$cz_theme/forums/images/icon_minipost.gif\" border=\"0\" alt=\"\"><a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a><br><font class=\"content\"><i>Last post by <A HREF=\"forum-userprofile-.html$poster_id\"STYLE=\"text-decoration: none\"> $username </a> in <a href=\"modules.php?name=Forums&amp;file=viewforum&amp;f=$forum_id\">$forum_name</a> on $post_time</i></font><br><br>";


And replace with
Code:
$content .= "<img src=\"themes/$cz_theme/forums/images/icon_minipost.gif\" border=\"0\" alt=\"\"><a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a><br><font class=\"content\"><i>Last post by  $username </a> in <a href=\"modules.php?name=Forums&amp;file=viewforum&amp;f=$forum_id\">$forum_name</a> on $post_time</i></font><br><br>";


Thu I replaced the lines, and tried a couple other similar blocks, the posters link did not reappear...I THINK this may be something to do with editting in the forums to remove posters details links as above posts??? So it may not be need if the forums poster details links are SOEed??
 
Steptoe







PostPosted: Mon Oct 17, 2005 5:33 pm Reply with quote

To remove MEMBERS ON LINE detail links in USER_INFO BLOCK, and only visible when logged in.
Find a line like this
Code:
if ( $i < 10 ) {

  $suid = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $prefix"._users." WHERE username='$session[uname]'"));
$who_online_now .= "$flag<A HREF=\"forum-userprofile-.html$user_id\"></a><a href=\"messages-post-.html$suid[0]\"><img src=\"images/blocks/pm.gif\" align=\"absmiddle\" border=\"0\" ALT=\"Send PM\"></a><a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$session[uname]\" title=$nip_addr>$session[uname]</a><br>\n";

Replace with this
Code:
if ( $i < 10 ) {

  $suid = $db->sql_fetchrow($db->sql_query("SELECT user_id FROM $prefix"._users." WHERE username='$session[uname]'"));
    $who_online_now .= "$flag<A HREF=\"forum-userprofile-.html$user_id\"></a><img src=\"images/blocks/pm.gif\" align=\"absmiddle\" border=\"0\" ALT=\"Send PM\"></a>$nip_addr $session[uname]</a><br>\n";


To remove last x NEW MEMBER detail links
Note: NEED HELPI have only figured out how to remove the link, at all times, needs to appear when logged in, tried alsorts of stuff.
Find a line like this
Code:
$content .= "<tr><td width=\"100%\"><img src=\"images/blocks/gold.gif\" border=0 align=\"center\" ALT=\"$user_regdate\"><a title=\"$user_regdate\" href=\"forum-userprofile-.html$lid\">$title2</a></td></tr>\n";


REPLACE with this
Code:
$content .= "<tr><td width=\"100%\"><img src=\"images/blocks/gold.gif\" border=0 align=\"center\" ALT=\"$user_regdate\">&nbsp;<a title=\"$user_regdate\" >$title2</a></td></tr>\n";

 
Steptoe







PostPosted: Mon Oct 24, 2005 9:22 pm Reply with quote

After much head banging I have found some stuff and updated the list 9 posts above. Wish some would have told me I was looking in the wrong folders/files.
I ready cant get my head around languages, including code....I have been at it on and off for almost a yrs now. Build a hot rod, give me a welder, design/build a garden..nps, I even used to be a reasonably good Golfer and surfer.
Im pig headed, Im good at most thinks I put my head to...Code IS NOT one of them.
AGAIN...PLEASE can someone help me with these?
http://www.ravenphpscripts.com/posts6130-highlight-.html
http://www.ravenphpscripts.com/posts6960-highlight-.html
http://www.ravenphpscripts.com/posts6846-highlight-.html
http://www.ravenphpscripts.com/posts7043-highlight-.html

maybe u have a garden or back yard u want designed? low maint? I will do it for u.
Im NOT after some thing for nothing..It is not the Kiwi way.
Steps.
 
Susann
Moderator



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

PostPosted: Fri Oct 28, 2005 7:22 pm Reply with quote

Maybe if you are finished with your forum it's a blank page.

"Im good at most thinks I put my head to...Code IS NOT one of them."

Ever heard about O'Reilly & PHP ? Smile
 
View user's profile Send private message
Steptoe







PostPosted: Fri Oct 28, 2005 8:30 pm Reply with quote

???? I just checked the site from a remove machine and its all there??
 
Susann







PostPosted: Fri Oct 28, 2005 9:06 pm Reply with quote

Sorry, was an ironic comment.A fter I've read some posts from you and I visit your site.Some buttons are gone that's all. Don't worry. Smile
 
Steptoe







PostPosted: Fri Oct 28, 2005 9:50 pm Reply with quote

ROTFL
One hast to laugh lol
I read your post " I my gosh I have screwed up again"
It all looks ok from the LAN?? oh well I have messed up like this before...
So bring up vnc remote Admin to a schools server on the other side of town, bring up in IE our site, have a look. All ok
So next thought is maybe u are using firefox or something lol...

Hope u can see the panic ROTFL

Then I count to 10 slloowwly..and panic in an organised manner....and think to myself...it cant be...ppl have been posting lol

Dont worry about it, got to see the funny side of things, life is too short to do otherwise lol

Anything that goes to a members details, other links not used when not logged on, stuff like that is all gone....unless u are logged on
 
Susann







PostPosted: Sat Oct 29, 2005 8:54 am Reply with quote

SEO fun ROTFL
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©