phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Self auth mod and no duplicate last post links

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 SEO TooLKit  » phpBB SEO Premod
::  
Author Message
jonli447



Joined: 31 Oct 2007
Posts: 6

Self auth mod and no duplicate last post linksPosted: Fri Dec 28, 2007 7:31 pm    Post subject: Self auth mod and no duplicate last post links

Hello Guys,

I have sort a little dilemma that I'm trying to resolve. I have a forum, located at (forum [dot] rozzli [dot] com). and I'm utilized a mod called "thewizard's self auth" mod to make certain topics only viewable to the author, admin, and mods.

Unfortunately, the Last Post information appears in the board index (I do want the public to know I have a private forum available). It would not be a big deal, except I can't figure out why the Last Topic subject also displays (I think it's a phpbb-seo mod, not sure which one does this though).

Anyhow, do you guys have any ideas, how I could replace the information in the Last Post block with the word "Private" for my private forum? The post counts and views could remain, I just want to hide the last post info. Alternatively, I would also be happy if the Last Post block in the private forum would show only the Author's Last Post.


Kindest Regards,

Jon
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Self auth mod and no duplicate last post linksPosted: Sat Dec 29, 2007 12:20 pm    Post subject: Re: Self auth mod and no duplicate last post links

Are you using the premod ?

I'm asking because the mod that could generate these links is the no duplicate and the premod is using the updated version (unreleased yet) which is the only one to add the topic title above the regular last post link.

I need to know this before I can help.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
jonli447



Joined: 31 Oct 2007
Posts: 6

Self auth mod and no duplicate last post linksPosted: Sat Dec 29, 2007 2:08 pm    Post subject: Re: Self auth mod and no duplicate last post links

Yes, I'm using premod version Gold. Thanks.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Self auth mod and no duplicate last post linksPosted: Sat Dec 29, 2007 2:40 pm    Post subject: Re: Self auth mod and no duplicate last post links

Topic moved where it belonged Wink

Then, it's all done in includes/functions_display.php, the part that build the links is this one :

Code:
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN -> no dupe
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password']) {
            $last_post_url =  append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&t=' . $row['topic_id'] . '&start=' . @intval($phpbb_seo->seo_opt['topic_last_page'][$row['topic_id']]) ) . '#p' . $row['forum_last_post_id'];
            // Limit in chars for the last post link text.
            $char_limit = 25;
            // Limit topic text link to $char_limit, without breacking words
            $topic_text_lilnk = $char_limit > 0 && ( ( $length = utf8_strlen($phpbb_seo->seo_censored[$row['topic_id']]) ) > $char_limit ) ? utf8_strlen($fragment = utf8_substr($phpbb_seo->seo_censored[$row['topic_id']], 0, $char_limit + 1 - 4)) < $length + 1 ? preg_replace('`\s*\S*$`', '', $fragment) . ' ...' : $phpbb_seo->seo_censored[$row['topic_id']] : $phpbb_seo->seo_censored[$row['topic_id']];
            $last_post_link = '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;t=' . $row['topic_id']) . '" title="' . $phpbb_seo->seo_censored[$row['topic_id']] . ' : ' . $phpbb_seo->seo_opt['topic_forum_name'][$row['topic_id']] . '">' . $topic_text_lilnk . '</a>';
         } else {   
            $last_post_url =  append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
            $last_post_link = '';
         }


You could just replace :
Code:
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password']) {


with :

Code:
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id_last_post'])) {


To show the regular postxx.html link with no info about the topic.

If you want to get rid of the extra link, you can just comment / delete these two lines :

Code:
            $topic_text_lilnk = $char_limit > 0 && ( ( $length = utf8_strlen($phpbb_seo->seo_censored[$row['topic_id']]) ) > $char_limit ) ? utf8_strlen($fragment = utf8_substr($phpbb_seo->seo_censored[$row['topic_id']], 0, $char_limit + 1 - 4)) < $length + 1 ? preg_replace('`\s*\S*$`', '', $fragment) . ' ...' : $phpbb_seo->seo_censored[$row['topic_id']] : $phpbb_seo->seo_censored[$row['topic_id']];
            $last_post_link = '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&amp;t=' . $row['topic_id']) . '" title="' . $phpbb_seo->seo_censored[$row['topic_id']] . ' : ' . $phpbb_seo->seo_opt['topic_forum_name'][$row['topic_id']] . '">' . $topic_text_lilnk . '</a>';


++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
jonli447



Joined: 31 Oct 2007
Posts: 6

Self auth mod and no duplicate last post linksPosted: Sat Dec 29, 2007 2:54 pm    Post subject: Re: Self auth mod and no duplicate last post links

Thanks dcz! Sorry about posting in the wrong section ... I tried to post in the correct spot. Wink

Do you know if it's possible to make it conditional? i.e. Keep the normal behavior for my public forum, and remove the extra link only for the private forum? The self auth mod does have an acl, so I thought maybe I could make it conditional up that?

Thanks again (FYI, to reciprocate you helpfulness, I'm recommending this community in forum promotion communities that I participate in).

--Jon
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Self auth mod and no duplicate last post linksPosted: Sat Dec 29, 2007 3:00 pm    Post subject: Re: Self auth mod and no duplicate last post links

Oh, yes, the mod, I only added the regular auth filtering here, which will show the postxx.html link for private forum and the nice one when you have enough right to read it.

It should be possible to add your mod type of auth too, could you post here a link to where it is officially released ?

And thanks for the recommendations Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
jonli447



Joined: 31 Oct 2007
Posts: 6

Self auth mod and no duplicate last post linksPosted: Sat Dec 29, 2007 3:12 pm    Post subject: Re: Self auth mod and no duplicate last post links

Hi, the mod's page is here: http://www.phpbb.com/community/viewtopic.php?f=70&t=553033&st=0&sk=t&sd=a

The download link is currently broken, but here's a direct link: http://www.mesarticles.fr/download/GR_Self_Auth_Mod_RC7_v0.1.0.rar
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Self auth mod and no duplicate last post linksPosted: Sun Dec 30, 2007 10:15 am    Post subject: Re: Self auth mod and no duplicate last post links

Given that :
Quote:
This MOD is development quality. It is not recommended that you install it on a live forum.


Try replacing :

Code:
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password']) {


with :

Code:
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id_last_post']) && $auth->acl_get('f_selfview', $row['forum_id_last_post'])) {


in includes/functions_display.php instaed Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
jonli447



Joined: 31 Oct 2007
Posts: 6

Self auth mod and no duplicate last post linksPosted: Sun Dec 30, 2007 5:03 pm    Post subject: Re: Self auth mod and no duplicate last post links

Thanks dcz. Your code worked great, except it needed one minor tweak.

Code:
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id_last_post']) && $auth->acl_get('f_selfview', $row['forum_id_last_post'])) {


should be:
Code:
         if ($phpbb_seo->seo_opt['no_dupe']['on'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id_last_post']) && !$auth->acl_get('f_selfview', $row['forum_id_last_post']))


f_selfview is set on restricted forums, so to make the condition correct, it would be when one has read permissions, and there's no selfview permission.

Thanks again, you're awesome. Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 SEO TooLKit  » phpBB SEO Premod
Page 1 of 1

Navigation Similar Topics

Jump to: