Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
tehw1n
Hangin' Around



Joined: Jul 15, 2008
Posts: 49

PostPosted: Tue Nov 03, 2009 5:24 pm Reply with quote

I've created a few custom modules for my site - and they work fine enough on their own, but they are clearly not integrating with the permissions groups and most importantly the block-modules main menu.
I'm missing a majority of the ACP > Module Edit options in my custom modules. Normally you can edit the following options:

Custom Module Name:
Who can View This?
What Groups:
Visible in Modules Block?

Mine only shows:
Custom Module Name:

It shows as active - but invisible in the Module Menu.
I basically just copied the majority of this code from another RN module, and created my own table content at the bottom. I'm still really new to this, how much am I missing here? Smile

Code:
<?php


if ( !defined('MODULE_FILE') ) {
    die ('You can\'t access this file directly...');
}

require_once('mainfile.php');
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
define('INDEX_FILE', true); //comment this out to hide right blocks
if (defined('INDEX_FILE')) { $index = 1; } else {$index = 0; } // auto set right blocks for pre patch 3.1 compatibility

include('header.php');

$cookie[0] = intval($cookie[0]);
if (!empty($cookie[1])) {
   $row = $db->sql_fetchrow($db->sql_query("SELECT name, username, user_email FROM ".$user_prefix."_users WHERE user_id='$cookie[0]'"));
   if (!empty($row['name'])) {
      $sender_name = stripslashes($row['name']);
   } else {
      $sender_name = stripslashes($row['username']);
   }
   $sender_email = stripslashes($row['user_email']);
}

OpenTable();
echo "<h1>New Module Header Here</h1>";
echo "blah blah blah";
CloseTable();

include_once('footer.php');
?>
 
View user's profile Send private message
tehw1n







PostPosted: Tue Nov 03, 2009 5:29 pm Reply with quote

oh.. jsut answered my own question. This module was marked as "Put in Home"
When you do this, the module Edit options are limited as I noted above.

took it out of Home, and all is well.
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Nov 03, 2009 5:33 pm Reply with quote

Does the module have a seperate language file? If not, remove the
Code:
get_lang($module_name); 
and see if that helps.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
nuken







PostPosted: Tue Nov 03, 2009 5:33 pm Reply with quote

Cool
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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 ©