Member
Member
FotoADS   03-04-2013, 06:31
#1

Well, I know - I should not have to modify the file template-functions.php, all zp-core files.

But...

I needed to change the admin drop down menu and carefully add the "Add Files". Since I am new to php, I was looking for the simplest solution, and I found them in the line:

`
[*]

Administrator
Administrator
acrylian   03-04-2013, 07:32
#2

The best way is to duplicate and rename the function you need to modify and move it either to your theme's functions.php or create a plugin. Then use that instead of the original in your theme. That is why those are possible.

The above is one reason why you never should modify core files. Of course you can do but in any case you need to do your modifications again with every update.

Member
Member
FotoADS   03-04-2013, 10:08
#3

Making a plugin for the time being is totally beyond my skills. Unless I decide to modify functions.php in /themes/zpArdoise.

Unfortunately, PHP is not the same as html and I have to learn everything all over again: D

Do I understand that I have to do:

  1. Restore the original file template-functions.php
  2. Copy all the code that handles the drop down toolbox
  3. Paste to /themes/zpArdoise/functions.php
  4. Change the name of the function of printAdminToolbox on their own (for example, printAdminToolboxMY)
  5. Enter my own name (echo gettext) for all menu items in my language (not connected with the function of language localization?)
  6. Make the necessary links menu and delete the ones I do not need.

questions:

  1. How and where to disable/remove AdminToolbox global function call, because I guess no exemption will be displayed along with my new menu.
    I understand that if I simply removed the line of code from the file template-functions.php it again will display the message of the need to re-install.
  2. Does the addition of functions printAdminToolboxMY to /themes/zpArdoise/functions.php, it will automatically start on each page, or requires a call For all the individual pages as index.php, gallery.php, etc.. and there are calls to be placed.

Sorry for my questions, that the lack of professionalism in them, but in spite of my lack of knowledge, everything will adapt itself to your needs than to ask the authors of a million modifications do not need anyone but me :-)

Administrator
Administrator
acrylian   03-04-2013, 10:56
#4

1.-4 Correct.
5 Not necessary, standard terms are covered by the main translations, Just your own won't.

Combined answer to the questions:
The toolbox is a function call printAdminToolbox();. You have to replace all calls in the theme with your own function. It is generally placed at the end of each theme template file in official themes or in a general footer.php page. I am not familiar with zpArdoise so you will have to search where the call(s) are.

Member
Member
sbillard   03-04-2013, 23:23
#5

fotoADS:

Well, the simplest way depends on your perspective. The simplest short them solution is to modify the template functions as you did. The message you get is simply a notification that something has changes. Since you know you made the change you do not have to worry about some compromise. But you do need to record the new status by running the setup scripts.

If you perspective is at all long-term, then the above will cause you to go through this same process of changing the script and re-running setup each time you update Zenphoto. That may prove not so simple after all.

Another possibility would be to try the development build. There have been some significant changes in "uploading" made there and along with that the upload link has been made global as you wish. (The significant changes are another reason why modifying the script might not be the simple solution--your modification will probably not work in the new code.)

Member
Member
FotoADS   06-04-2013, 00:59
#6

Gentlemen, thank you for your help! I think with these descriptions I can. At the moment I correct in other parts of the page. Effects (despite the lack of knowledge) more and more I like. As soon as I will take for this piece of work and have problems, certainly I will more asking in this thread.

I warmly greet
Adrian

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.