xoops forums

Zap_English

Quite a regular
Posted on: 2/16 12:43
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 233
Since: 2016/5/24
#1

Publisher Clone & xBootstrap Module

Publisher Clone - xBootstrap

If someone wants to create a module to create the xBootstrap templates for a cloned Publisher module, here is what changes the module needs to make.

for this example, we'll use the name "clone"

1) copy the publisher subdir in /themes/xbootstrap/modules/publisher and rename /themes/xbootstrap/modules/clone

2) rename all files in /themes/xbootstrap/modules/clone publisher_ to clone_

3) rename all files in /themes/xbootstrap/modules/clone/blocks publisher_ to clone_

4) rename subdir /themes/xbootstrap/modules/clone/xoops_and_module_changes/modules/publisher to /themes/xbootstrap/modules/clone/xoops_and_module_changes/modules/clone

5) rename the file /themes/xbootstrap/modules/clone/xoops_and_module_changes/modules/clone/css/publisher.css to clone.css

Now that you have renamed the files and subdirectories, you can start doing search and replace in all the .tpl, .php and .css files. These are the variables that have to be changed. Again we use the example "clone".

NOTE: PAY ATTENTION TO CASE

Publisher_ to Clone_
pub_ to clo_
_PUBLISHER_ to _CLONE_
publisher- to clone-
PublisherRequest to CloneRequest
PUBLISHER_URL to CLONE_URL
PublisherMetagen to CloneMetagen
PUBLISHER_DIRNAME to CLONE_DIRNAME
PUBLISHER_ to CLONE_
$publisher to $clone
PublisherPublisher to CloneClone
PublisherCategory to CloneCategory
/publisher/ to /clone/
publisher = to clone =
PublisherItem to CloneItem
PUBLISHER_ to CLONE_
publisher_ to clone_

That's it. Now you have xBootstrap templates that will work with your Publisher Clone

LioMJ

Just popping in
Posted on: 2/16 20:22
LioMJ
LioMJ (Show more)
Just popping in
Posts: 29
Since: 2012/4/10
#2

Re: Publisher Clone & xBootstrap Module

There is an easier way

1. Copy all files and folders in root/themes/xbootstrap/modules/publisher/ to root/modules/publisher/templates/ (replace files and folders)

2. Clone the publisher module

3. Now your clone publisher module using the bootstrap templates

Zap_English

Quite a regular
Posted on: 2/17 5:49
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 233
Since: 2016/5/24
#3

Re: Publisher Clone & xBootstrap Module

I tried that once and it didn't work

geekwright

Quite a regular
Posted on: 2/20 16:56
geekwright
geekwright (Show more)
Quite a regular
Posts: 204
Since: 2010/10/15
#4

Re: Publisher Clone & xBootstrap Module

Quote:

Zap_English wrote:
I tried that once and it didn't work


Works perfectly here. Not sure what might have gone wrong for you.

Started with clean publisher. Copied everything from hthemes/xbootstrap/modules/publisher to modules/publisher/templates. Install publisher and clone it. Don't forget to clear smarty caches if you have been playing a lot.

That process you described is exactly what the clone process does. It isn't magic. It depends on consistent naming, and just copies files with changed names and replaces specific text in the files to create the clone.