Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display Latest Threads Respecting Permissions?
#1
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.
Reply
#2
OFF TOPIC :
may be you have to hire a coder unless an expert comes forward to volunteer to help with the code ...
Reply
#3
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
Reply
#4
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
Reply
#5
^ oh ! that appears to be a smart method Smile no need of hard coding ..
Reply
#6
(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!
Reply
#7
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
Reply
#8
@ Omar G.

Do you speak Arabic ?

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


Forum Jump:


Users browsing this thread: 1 Guest(s)