:lol:genial!! va perfecto!! mil gracias!! bueno, para aquellos que tengan el mod de noticias instalado, yo he hecho que todos los moderadores puedan publicar noticias, se haria de forma muy sencilla asi:
ADDON TODOS LOS MODERADORES PUEDEN PUBLICAR NOTICIAS
Localiza en : admin/index.php ya modificado por excitex2
//// Nuevo tipo de usuario /////////////
/*
// ********* Antes ************
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
// ********* Ahora ************
*/
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_categorias'] == 1)) {
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_imagenes'] == 1)) {
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_comentarios'] == 1)) {
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_usuarios'] == 1)) {
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
}
if ($user_info['user_level'] == ADMIN && $user_info['user_level'] != MODERADOR && $user_info['user_level'] != GUEST) {
show_nav_header($lang['nav_users_moderadores_main']);
show_nav_option($lang['nav_users_moderadores_edit'], "users.php?action=findusers&usuario=moderadores");
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
}
////////// Fin nuevo tipo de usuario //////
Cambiar a :
//// Nuevo tipo de usuario /////////////
/*
// ********* Antes ************
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
show_nav_header($lang['news_main']);
show_nav_option($lang['news_add'], "news.php?action=addnews");
show_nav_option($lang['modify_news'], "news.php?action=modifynews");
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
// ********* Ahora ************
*/
if ($user_info['user_level'] == ADMIN || $user_info['user_level'] == MODERADOR) {
//como es moderador o administrador le permito mostrar noticias
show_nav_header($lang['news_main']);
show_nav_option($lang['news_add'], "news.php?action=addnews");
show_nav_option($lang['modify_news'], "news.php?action=modifynews");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_categorias'] == 1)) {
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_imagenes'] == 1)) {
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_comentarios'] == 1)) {
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_usuarios'] == 1)) {
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
}
if ($user_info['user_level'] == ADMIN && $user_info['user_level'] != MODERADOR && $user_info['user_level'] != GUEST) {
show_nav_header($lang['nav_users_moderadores_main']);
show_nav_option($lang['nav_users_moderadores_edit'], "users.php?action=findusers&usuario=moderadores");
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
}
////////// Fin nuevo tipo de usuario //////
ahora los moderadores ven la seccion de noticas en el panel de control. Si queremos que puedan editar o eliminarlas desde la noticia en la web con [Editar] [Eliminar] hacemos lo siguiente:
Localiza en : news.php[/b]
if ($user_info['user_level'] == ADMIN)
Cambia a:
if (($user_info['user_level'] == ADMIN) || ($user_info['user_level'] == MODERADOR))
-------------------------------------------------------
ADDON MODERADORES DE NOTICIAS
Si en vez de lo anterior lo que se quieres es tener un nuevo moderador de noticias, de manera que puedas decidir quienes pueden publicarlas de entre los moderadores, habria que añadir un nuevo atributo a la tabla de usuarios de 4images, llamado user_moderador_noticias en phpMyAdmin
ALTER TABLE 4images_users ADD user_moderador_noticias tinyint(1) NOT NULL default '0'
Localiza en lang/tu_idioma/admin.php
$lang['field_moderador_usuarios'] = "Este MODERADOR tendrá control sobre los usuarios ? :";
Añada debajo :
$lang['field_moderador_noticias'] = "Este MODERADOR tendrá control sobre las noticias ? :";
Localiza en : admin/index.php ya modificado por excitex2
//// Nuevo tipo de usuario /////////////
/*
// ********* Antes ************
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
// ********* Ahora ************
*/
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_categorias'] == 1)) {
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_imagenes'] == 1)) {
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_comentarios'] == 1)) {
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_usuarios'] == 1)) {
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
}
if ($user_info['user_level'] == ADMIN && $user_info['user_level'] != MODERADOR && $user_info['user_level'] != GUEST) {
show_nav_header($lang['nav_users_moderadores_main']);
show_nav_option($lang['nav_users_moderadores_edit'], "users.php?action=findusers&usuario=moderadores");
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
}
////////// Fin nuevo tipo de usuario //////
Cambiar a :
//// Nuevo tipo de usuario /////////////
/*
// ********* Antes ************
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
show_nav_header($lang['news_main']);
show_nav_option($lang['news_add'], "news.php?action=addnews");
show_nav_option($lang['modify_news'], "news.php?action=modifynews");
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
// ********* Ahora ************
*/
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_categorias'] == 1)) {
show_nav_header($lang['nav_categories_main']);
show_nav_option($lang['nav_categories_edit'], "categories.php?action=modifycats");
show_nav_option($lang['nav_categories_add'], "categories.php?action=addcat");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_noticias'] == 1)) {
show_nav_header($lang['news_main']);
show_nav_option($lang['news_add'], "news.php?action=addnews");
show_nav_option($lang['modify_news'], "news.php?action=modifynews");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_imagenes'] == 1)) {
show_nav_header($lang['nav_images_main']);
show_nav_option($lang['nav_images_edit'], "images.php?action=modifyimages");
show_nav_option($lang['nav_images_add'], "images.php?action=addimages");
show_nav_option($lang['nav_images_validate'], "validateimages.php?action=validateimages");
show_nav_option($lang['nav_images_check'], "checkimages.php?action=checkimages");
show_nav_option($lang['nav_images_thumbnailer'], "thumbnailer.php?action=checkthumbnails");
show_nav_option($lang['nav_images_resizer'], "resizer.php?action=selectoptions");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_comentarios'] == 1)) {
show_nav_header($lang['nav_comments_main']);
show_nav_option($lang['nav_comments_edit'], "comments.php?action=modifycomments");
}
if ($user_info['user_level'] == ADMIN || ($user_info['user_level'] == MODERADOR && $user_info['user_moderador_usuarios'] == 1)) {
show_nav_header($lang['nav_users_main']);
show_nav_option($lang['nav_users_edit'], "users.php?action=modifyusers");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_add'], "users.php?action=addusers");
}
show_nav_option($lang['nav_usergroups'], "usergroups.php?action=modifygroups");
if (!defined('USER_INTEGRATION')) {
show_nav_option($lang['nav_users_email'], "email.php?action=emailusers");
}
}
if ($user_info['user_level'] == ADMIN && $user_info['user_level'] != MODERADOR && $user_info['user_level'] != GUEST) {
show_nav_header($lang['nav_users_moderadores_main']);
show_nav_option($lang['nav_users_moderadores_edit'], "users.php?action=findusers&usuario=moderadores");
show_nav_header($lang['nav_general_main']);
show_nav_option($lang['nav_general_settings'], "settings.php?action=modifysettings");
show_nav_option($lang['nav_general_templates'], "templates.php?action=modifytemplates");
show_nav_option($lang['nav_general_backup'], "backup.php?action=modifybackups");
show_nav_option($lang['nav_general_stats'], "stats.php?action=resetstats");
show_nav_option("phpinfo()", "phpinfo.php");
if (@is_dir("plugins")) {
show_nav_header("PlugIns");
$handle = @opendir("plugins/");
while ($file = @readdir($handle)) {
if (eregi("^\.{1,2}$", $file) || !eregi("\.php$", $file)) {
continue;
}
$plugin_file = file("./plugins/".$file);
$plugin_file[0] = trim($plugin_file[0]);
if (preg_match("/PLUGIN_TITLE:([a-zäöüß0-9\-_ ]+)/i", $plugin_file[0], $regs)) {
show_nav_option(trim($regs[1]), "./plugins/".$file);
}
else {
show_nav_option($file, "./plugins/".$file);
}
}
}
////////// Fin nuevo tipo de usuario //////
ahora los moderadores ven la seccion de noticas en el panel de control. Si queremos que puedan editar o eliminarlas desde la noticia en la web con [Editar] [Eliminar] hacemos lo siguiente:
Localiza en : news.php[/b]
if ($user_info['user_level'] == ADMIN)
Cambia a:
if (($user_info['user_level'] == ADMIN) || ($user_info['user_level'] == MODERADOR))
Localiza en : admin/users.php
$user_moderador_usuarios = intval($HTTP_POST_VARS['user_moderador_usuarios']);
Añada Debajo:
$user_moderador_noticias = intval($HTTP_POST_VARS['user_moderador_noticias']);
Localiza:
user_moderador_comentarios = '$user_moderador_comentarios',
Añade en la misma linea:
user_moderador_noticias = '$user_moderador_noticias',
Localiza:
show_radio_row($lang['field_moderador_usuarios'], "user_moderador_usuarios", $user_row['user_moderador_usuarios'], 1);
Añade despues:
show_radio_row($lang['field_moderador_noticias'], "user_moderador_noticias", $user_row['user_moderador_noticias'], 1);
Localiza:
$user_moderador_usuarios = intval($HTTP_POST_VARS['user_moderador_usuarios'.$i]);
Añade debajo:
$user_moderador_noticias = intval($HTTP_POST_VARS['user_moderador_noticias'.$i]);
Por fa excitex2 si falta algo siguelo.. por ejemplo constants.php que no lo entiendo (si pudieras explicarmelo genial ^^). yo no lo he probado pero creo que funcionaria, y si puede ayudar asi a alguien mucho mejor. yo cuando empece con 4images no entendia nada de nada, asiq espero ayudar.