Current time: 04-23-2014, 09:17 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display Latest Threads Respecting Permissions?
12-14-2011, 10:26 PM (This post was last modified: 12-14-2011 10:28 PM by rossco.)
Post: #1
Display Latest Threads Respecting Permissions?
Hello,

I'm trying to display the latest 10 threads on the home page of my site which is running on a CMS. I have tried using MyBBIntegrator but for some reason it does not work that well. I signed up to phpdave but like many, he appears to not bother activating people's accounts.

I have several boards that I do not wish to be public but at the same time I would like threads in these boards to be visible to a user who has permissions to view them. I already am using the latest posts plugin on the forum which works well but how to either use this plugin or MyBBIntegrator to display permission based posts?

I have already integrated the forum/cms login system using MyBBIntegrator and it works well but I can't seem to get permission based threads to appear.

Has anyone got some experience with this at all? I did try getLatestActiveThreads but it doesn't seem to work how it should and without being able to post on phpdave then I'm kinda stuck.

Is it possible to run plugins out with the forum using the global.php?

If anyone can give me an idea that would be great.
Find all posts by this user
Quote this message in a reply
12-15-2011, 08:14 AM
Post: #2
RE: Display Latest Threads Respecting Permissions?
OFF TOPIC :
may be you have to hire a coder unless an expert comes forward to volunteer to help with the code ...
Find all posts by this user
Quote this message in a reply
12-15-2011, 02:23 PM
Post: #3
RE: Display Latest Threads Respecting Permissions?
I can code this myself as I'm a developer... I just wondered if there's a quick solution that is already available to overcome the same issues I have with the permissions.

Thanks
Find all posts by this user
Quote this message in a reply
12-15-2011, 02:36 PM
Post: #4
RE: Display Latest Threads Respecting Permissions?
What I do in my webpage, plain php, is include_once a copy of the portal.php, edited to use only the necessary code to show the latests threads box without trowing errors.

Support PM's will be ignored. Angel
Visit this user's website Find all posts by this user
Quote this message in a reply
12-15-2011, 03:12 PM
Post: #5
RE: Display Latest Threads Respecting Permissions?
^ oh ! that appears to be a smart method Smile no need of hard coding ..
Find all posts by this user
Quote this message in a reply
12-16-2011, 10:31 PM
Post: #6
RE: Display Latest Threads Respecting Permissions?
(12-15-2011 02:36 PM)Omar G. Wrote:  What I do in my webpage, plain php, is include_once a copy of the portal.php, edited to use only the necessary code to show the latests threads box without trowing errors.

Hi Omar,

thanks for the reply. I have had a look at the portal.php file and tried to find how this is actually included on my site.

My forum is in /bb directory and I changed the $forumdir to "./bb"; and the $change_dir to "./bb"; but I get `$forumdir is invalid!`.

Any idea?

Thanks!
Find all posts by this user
Quote this message in a reply
12-16-2011, 11:52 PM
Post: #7
RE: Display Latest Threads Respecting Permissions?
Then forumdir is invalid.

I use this at the beggining of my file:
PHP Code:
$forumdir './foros';
define("IN_MYBB"1);

$filename substr($_SERVER['SCRIPT_NAME'], -strpos(strrev($_SERVER['SCRIPT_NAME']), "/"));
define('THIS_SCRIPT'$filename);

$current_dir getcwd();

//change working directory to allow board includes to work
$forumdirslash $forumdir."/";
$change_dir "./";

if(!@
chdir($forumdir) && !empty($forumdir))
{
    if(@
is_dir($forumdir))
    {
        
$change_dir $forumdir;
    }
    else
    {
        die(
"\$forumdir is invalid!");
    }
}

//setup templates
//$templatelist = "pc_header,pc_footer";

//get MyBB stuff
require_once $change_dir."/global.php";

//change directory back to current where script is
@chdir($current_dir);

//adjust theme settings in case this file is outside mybb_root
global $theme$templates;
$theme['imgdir'] = $mybb->settings['bburl']."/".$theme['imgdir'];
$theme['imglangdir'] = $mybb->settings['bburl']."/".$theme['imglangdir'];

define("IN_PORTAL"1);

// set the path to your forums directory here (without trailing slash)

// end editing

$templatelist "portal_welcome,portal_welcome_membertext,portal_stats,portal_search,portal_whoso​nline_memberbit,portal_whosonline,portal_latestthreads_thread_lastpost,portal_la​testthreads_thread,portal_latestthreads,portal_announcement_numcomments_no,porta​l_announcement,portal_announcement_numcomments,portal_pms,portal"

My forum is located here:
htdocs+
-file.php
--foros

Support PM's will be ignored. Angel
Visit this user's website Find all posts by this user
Quote this message in a reply
12-18-2011, 05:20 AM
Post: #8
RE: Display Latest Threads Respecting Permissions?
@ Omar G.

Do you speak Arabic ?

if you speak arabic , please view this topic ( http://community.mybb.com/thread-109973.html ) & help me

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication