MyBB Community Forums

Full Version: changing a template name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I've run into a problem where my host is running something called mod_security, which I understand is a module for apache that works great aganst sql-injections... at least part of it works by recognizing strings in the URLs sent to the webserver...
now one of the rules captures string 'rcp' which is often used for Remote Copy Process (or something like that)....however also MyBB uses that ....
if you go to Admin-section and try to expand the usercp -templates....it will build a url that contains usercp in the URL...at this point the webserver just lets you know that you don't have authority to do that and refuses to show the page....

soooo.....can anyone please talk me through all the changes I would need to do in order to change the templates with usercp in the name into something like usercontrolpanel (for example)??

Please this is important to me.

cheers,
kimmo
I really need some help with this please. It is preventing me from customizing any usercp templates...and this is critical for me.
My new site will be in 800x600 format with a menu-section on the left...and the forum will be presented in the content-area only....everything else works great....except that usercp-menu is taking so large area that there's hardly any room for the data....so I want to re-arrnge the page....but can't do that if I don't have access to the usercp-templates

It cant' be that difficult to change the name of one template-set...just need to know where to change and what....

cheers,
Kimmo
Rename all your usercp templates
Then look through the usercp.php and usercp2.php and search for anything like this:
eval("\$awaysection = \"".$templates->get("usercp_profile_away")."\";");
and replace the usercp in that parameter with the one you renamed to.
well I couldn't get it to work....I manually changed all the template-names..about 54 of them....
then went on to edit the usercp.php and usercp2.php

this is where I got confused...

there are templatelists, the eval-thingies, hooks etc. all pointing to usercp or usercp_ and I wasn't quite sure which ones are referring to templates and which ones to functions....and in the end didn't get it to work Sad

so I changed everything back....and I am in square 1 again Sad

luckily my development-server is not running the mod_security -thingy so I can develop and change teh templates there.....and hopefully my templates will all be ready by the time we move the new system to the production-server

incidentally, it is quite interesting that the mod does NOT stop URLs like http://www.mysites.com/forum/usercp.php but only when it comes across the string 'rcp' in the variables behind the filename...

cheers,
kimmo
any help with this? a little more detailed instructions on how to do this would be helpful...
on our development-server we're implementing stuff like this:

[attachment=1647]
[attachment=1648]

and I want to be able to move the blocks in the usercp around a little to make it look nicer (only have about 2/3 of the page designed for 800x600 resolution available)....just able to access the templates on the development-server but not when we move to the production-server...(because of the usercp -issue....)

cheers,
Kimmo
bump...