>>  Site Map >>  Forums >>  Modules 7x

Forum module - topics in forum:



Modules 7x - Discussions regarding PHP-Nuke Modules. 7x



[Forums] adding a page in the ACP

Hi all
Every page put in modules/Forum/admin/ with the prefix admin_, in the ACP is normally linked, while all the other pages are linked in this way

Code: :
modules/Forums/admin/modules.php?name=Forums&file=new_page


because of this line in admin/index.php (I suppose)

Code: :
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) )


well, I tried to edit it in this way to make it possibile to have a normal link also with pages with the new_ prefix

Code: :
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) || preg_match("/^new_.*?\." . $phpEx . "$/", $file) )


but the left frame in the ACP isn't displayed anymore Rolling Eyes
what should I do to add a new page normally linked with another prefix?






Que?

What are you trying to do?






Laughing
I have many pages with the new_ prefix and I want to have a direct link in the ACP menu, like this

Code: :
modules/Forums/admin/new_page.php


and not like this

Code: :
modules/Forums/admin/modules.php?name=Forums&file=new_page







What do you mean you have many pages with the new_ prefix???

Got a link to your site? and a proper explanation of what the problem is






at the moment I'm working on a web server installed on my own pc, I can't link anything to you
anyway I'll try to explain it better Smile

if you open the /modules/Forums/admin/ folder you will see that there are many pages with the admin_ prefix: admin_account.php, admin_avatar.php, admin_board.php etc etc... And if you go to the ACP you will also see that in the left frame there are many links, each one redirect to one of this page.
An example could be

Code: :
modules/Forums/admin/admin_account.php


Otherwise, if you create a new page without the admin_ prefix (new_page.php, for example) and go to the ACP you will see that you can reach this page but the link is like this

Code: :
modules/Forums/admin/modules.php?name=Forums&file=new_page


I wold like to have normal link also for this type of pages






I must admit I cant understand what you're after either. Confused






Like I said - what exactly are you actually trying to do?

Quote: :

there are many pages with the admin_ prefix: admin_account.php


they are not pages - they are files

Quote: :

Otherwise, if you create a new page without the admin_ prefix (new_page.php, for example) and go to the ACP


And just why are you trying to do this?

Quote: :

but the link is like this

Code: :
Code:
modules/Forums/admin/modules.php?name=Forums&file=new_page



Because thats how it works.






dirk Wrote: :
And just why are you trying to do this?


because I have many files to add to the ACP and all with another prefix that are linked in a wrong way and so they aren't displayed Rolling Eyes

dirk Wrote: :
Because thats how it works.


yes, ok, but as you can see it doesn't work in this way with pages with the admin_ prefix. So now I'm trying to change this line in admin/index.php

Code: :
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) )


with this

Code: :
if( preg_match("/^admin_.*?\." . $phpEx . "$/", $file) || preg_match("/^new_.*?\." . $phpEx . "$/", $file) )


but it doesn't work...






And it wont work....

What files are you trying to add?

Is there not some installer for these files? They are obviously some sort of addon for the Forums.... Are they compatible with Nuke? Did you get them from phpbb? If so they will not work.

You should not be making ANY changes to your Forums/admin/index.php.

As I have said before - explain EXACTLY what you are actually trying to do and better assistance can be offered - at the monment it is as clear as mud what you are trying to achieve and whatever it is you are going about it the wrong way.






it's an MOD for phpbb forum that's not compatible with phpnuke ( http://www.phpbbstyles.com/viewtopic.php?t=356 )... or, better, it will become compatible after editing correctly the admin/index.php file Smile






http://ravenphpscripts.com/postt7946.html






this was the reason for which I didn't say exactly what I was going to do Laughing
I know that the mod is not compatible with nuke portal... but, as I've already done with many other mods, with only a few code modifications it could become compatible Wink

so, my initial question was only a "coding" question Smile
if you know why the admin panel isn't displayed anymore, please tell me, else thanks anyway Wink




Attention! You are currently viewing sitemap page!
We strongly suggest to look at original content

Search from web

Valid HTML 4.01 Valid CSS