SUPPORT TOPIC File Information
- Submitted: Aug 28 2012 04:52 PM
- Last Updated: Sep 10 2012 12:04 PM
- File Size: 90.2KB
- Views: 1244
- Downloads: 22
Download (Wolf) Export Hook With Version Numbers 33001 (3.3 Beta 01)2 Votes
Very very simple. When exporting a hook, it will change the default name (which is just the hook's key with '.xml' added to it) to a name that includes the version number(s) in it.
Using this hook as an example, it changes this:
wolf_exportHookWithVersionNumbers 33000 (v3.3 Alpha).xml
Tested on IPB 3.3.4. May work for 3.0.x to 3.2.x but is untested. (If you use a version prior to 3.3.0, please leave feedback with your version of IPB and whether or not this hook worked for you.)
- Adds version number to exported filename automatically.
- Can update hook files with new header information
- Header information customizable
- Choose commenting style of header
- Change start/end tags for replacement
- Test mode for file modifications (leaves original files alone)
- Backup mode available
This will let you create a generic header (via settings) to place inside the PHP files associated with the hook. When exporting, it will replace the content located between two tags with an updated header. When dealing with multiple files for one hook, it can be cumbersome to update each file with new version information if only one file was changed. Thus, this feature.
The tags are customizable but are defaulted to '#soh' and '#eoh' for start and end, respectively. Here is an example of how it looks in a php file:
// some customized details
// to give generic information
// about this file
The three lines between the two tags would get replaced with the customized header. This makes it easy to include name, email, copyright info, site, version number, dates, etc.
There is also a '#created' tag, where you can put the unix timestamp for when the hook/file was first created. If it's found, it will use this to set <#thisyear#> to the original year of the hook/file. If the '#created' tag is between the two main tags, it will add it after the end tag.
There are four modes for the header features. If you don't want it to be used at all, just set it to be off. Otherwise I recommend 'test' mode, as that will write out to a new file (same file name with '.NEW' added to it), so you can confirm that it won't corrupt your file during the process. I strongly recommend test mode for a few days and also making a backup of all files. I have tested it and even used it when exporting this hook, but it's "better safe than sorry."
(At some point I will provide a list of tags and what information it supplies. For now, the example in the settings should suffice or you can open the 'export' file and take a peek.)
This hook may not be redistributed, shared, copied, or duplicated in any way without my approval.
What's New in Version 33001 (3.3 Beta 01) (See full changelog)
- - Added feature to update hook files with header information
Other files you may be interested in ..
By Adriano Faria
Dec 08 2013 06:22 PM FREE
Dec 04 2013 01:32 AM $12.50
By Adriano Faria
Nov 28 2013 08:41 AM $6.11
Nov 27 2013 10:47 PM $8.88
Nov 26 2013 10:26 AM $10.00
Nov 25 2013 07:50 AM FREE
Nov 23 2013 10:28 AM $8.00
Nov 23 2013 12:48 AM $6.11
- 3,166 Total Files
- 53 Total Categories
- 538 Total Authors
- 635,947 Total Downloads
- (NB34) Month Top Posters Latest File
- newbie LAC Latest Submitter
74 user(s) are online (in the past 30 minutes)
17 members, 54 guests, 1 anonymous users
Google (1), +BatsJuan, +Rugger, redykt, +Alex DraGos, Zaxir, Google Mobile (1), RedExtreme, +Aussie Cable, +Draffi, +sk8er_boi, +STiX360, +darkreaper1337, +Christof Huben, Guru Samrat, +Sergey_SV, OldschoolRO, statki97, +MarcosBC