COPY command, from subSilver to different template?

This is a temporary forum setup for the purpose of discussing the EMC standards
Locked
niksa
Registered User
Posts: 88
Joined: Sat Mar 20, 2004 5:32 pm

COPY command, from subSilver to different template?

Post by niksa »

I wrote an update script to upgrade a specific template to 2.0.19 standards. I want to just copy some /admin/ files from subSilver to Chronicles, but I don't want to include all those subSilver files in the upgrade.. I just want this to be a single file that can be posted in the thread.

So I want to do this:

Code: Select all

# 
#-----[ COPY ]------------------------------------------ 
# 
copy templates/subSilver/admin/board_config_body.tpl to templates/Chronicles/admin/board_config_body.tpl
copy templates/subSilver/admin/category_edit_body.tpl to templates/Chronicles/admin/category_edit_body.tpl
copy templates/subSilver/admin/db_utils_backup_body.tpl to templates/Chronicles/admin/db_utils_backup_body.tpl
copy templates/subSilver/admin/disallow_body.tpl to templates/Chronicles/admin/disallow_body.tpl
copy templates/subSilver/admin/forum_admin_body.tpl to templates/Chronicles/admin/forum_admin_body.tpl
copy templates/subSilver/admin/group_edit_body.tpl to templates/Chronicles/admin/group_edit_body.tpl
copy templates/subSilver/admin/index_body.tpl to templates/Chronicles/admin/index_body.tpl
copy templates/subSilver/admin/index_frameset.tpl to templates/Chronicles/admin/index_frameset.tpl
copy templates/subSilver/admin/ranks_list_body.tpl to templates/Chronicles/admin/ranks_list_body.tpl
copy templates/subSilver/admin/smile_edit_body.tpl to templates/Chronicles/admin/smile_edit_body.tpl
copy templates/subSilver/admin/styles_addnew_body.tpl to templates/Chronicles/admin/styles_addnew_body.tpl
copy templates/subSilver/admin/styles_edit_body.tpl to templates/Chronicles/admin/styles_edit_body.tpl
copy templates/subSilver/admin/styles_list_body.tpl to templates/Chronicles/admin/styles_list_body.tpl
copy templates/subSilver/admin/user_ban_body.tpl to templates/Chronicles/admin/user_ban_body.tpl
copy templates/subSilver/admin/user_edit_body.tpl to templates/Chronicles/admin/user_edit_body.tpl
copy templates/subSilver/admin/words_edit_body.tpl to templates/Chronicles/admin/words_edit_body.tpl
But when I do that, it wants me to have all those subSilver files within the admin/mod/ directory. I understand why this is like that - because it's safe, and I, in theory, don't know if the person using the update script is running the correct version of phpbb as the script was written for. But in this case I don't think it matters because the new template should always have the same /admin/ files, in essence, as whatever native subSilver folder that the current version has. You know what I mean?

I've also tried CD'ing out of the directory ala: ../templates/subSilver/admin/etc.tpl but this didn't work:

Code: Select all


Critical Error

COPY FAILED&#58 The target file to be copied [./mods/updateChronicles_1.0.1/../templates/subSilver/admin/board_config_body.tpl] could not be found.
copy ../templates/subSilver/admin/board_config_body.tpl to templates/Chronicles/admin/board_config_body.tpl
MOD script line #69 &#58&#58 FAQ &#58&#58 Report
Basically meaning I can't CD out of the /mods/ folder by using simple [../]

My current "solution" is to just make it DIY instead of COPY. Is this the only way to really do it or can anyone suggest something else? In the meantime I'm going to keep it DIY.
User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: COPY command, from subSilver to different template?

Post by Nux »

Have you tried something like:

Code: Select all

copy ../../templates/subSilver/admin/board_config_body.tpl to templates/Chronicles/admin/board_config_body.tpl
(not sure how many updirs there should be)

In general this will be hard to do as EM assumes that in

Code: Select all

copy (1) to (2)
(1) - is somewhere in the MOD folder
(2) - is somewhere in the root dir of phpBB
+ if (2) would start with "templates/subSilver" EM would try to change this to any other installed templates...

You'll have to experiment, but I don't belive that the behavior you are trying to get had been anticipated by the developers.

None the less, Good luck :).
niksa
Registered User
Posts: 88
Joined: Sat Mar 20, 2004 5:32 pm

Re: COPY command, from subSilver to different template?

Post by niksa »

Good ideas, I'll definitely give it a try tonight. I'll post with the results. :mrgreen:
Locked