Copyright Footer Management

Copyright Footer Management

DragonByte Tech

Well-known member
DragonByte Tech submitted a new resource:

Copyright Footer Management - Easy way to merge your products' copyright footers in a single line!

This is a quick and dirty tutorial for how to automatically merge all copyright footers from your products into a single line, avoiding a situation where you have 5 mods released with 5 separate lines :D

Template Modifications

Template: PAGE_CONTAINER
Modification Key: your_namespace_copyright_footer_display
Description: Copyright Footer
Search type: PHP Callback
Find: #({{ phrase\('extra_copyright'\) }})#si...

Read more about this resource...
 
Thanks for your resource. Did you have an example for the details.php?
That depends on the eCommerce tool used on your particular site. For DBTech's custom copyright footer in conjunction with DB eCommerce, I use this controller:

PHP:
<?php

namespace DBTech\Custom\DBTech\eCommerce\Pub\Controller;

/**
 * Class Product
 *
 * @package DBTech\Custom\DBTech\eCommerce\Pub\Controller
 */
class Product extends XFCP_Product
{
    /**
     * @return \XF\Mvc\Reply\Reroute|\XF\Mvc\Reply\View
     * @throws \InvalidArgumentException
     */
    public function actionDetails()
    {
        /** @var \DBTech\eCommerce\ControllerPlugin\Overview $overviewPlugin */
        $overviewPlugin = $this->plugin('DBTech\eCommerce:Overview');
        
        $categoryParams = $overviewPlugin->getCategoryListData();
        $viewableCategoryIds = $categoryParams['categories']->keys();
        
        $productRepo = $this->getProductRepo();
        
        $productFinder = $productRepo->findProductsForOverviewList($viewableCategoryIds)
            ->where('product_id', explode(',', $this->filter('products', 'str')));
        
        $products = $productFinder->fetch()->filterViewable();
        
        $canInlineMod = false;
        foreach ($products AS $product)
        {
            /** @var \DBTech\eCommerce\Entity\Product $product */
            if ($product->canUseInlineModeration())
            {
                $canInlineMod = true;
                break;
            }
        }
        
        $listParams = [
            'products' => $products,
            'filters' => [],
            'ownerFilter' => null,
            'platformFilter' => null,
            'canInlineMod' => $canInlineMod,
        ];
        
        $viewParams = $categoryParams + $listParams;
        return $this->view('DBTech\eCommerce:Overview', 'dbtech_ecommerce_overview', $viewParams);
    }
}


Fillip
 
@DragonByte Tech

Unrelated to this resource, but related to your Global Branding Removal that costs $399/site!

Well, I got it for 2 of my sites. Now I see I can't get it for XF2. It just shows XF1 version download drop down. Does it really mean I have to pay another $800 to remove 1 line? or it just means something is missed there and you will add it?

Thanks
 
@DragonByte Tech

Unrelated to this resource, but related to your Global Branding Removal that costs $399/site!

Well, I got it for 2 of my sites. Now I see I can't get it for XF2. It just shows XF1 version download drop down. Does it really mean I have to pay another $800 to remove 1 line? or it just means something is missed there and you will add it?

Thanks
Sorry for the confusion, the XF2 version does not need a download. If the site URL in the Global Branding Free product matches the site URL exactly of all the other XF2 products, they will have their branding automatically stripped on download.

That being said, like every other license it is per-site so if you're running both an XF1 and XF2 forum, you'll need two copies of each license as well as two copies of the Global Branding Free.


Fillip
 
Fillip,
could you share how - if a customer has puchased that - to deactivate the copyright notice? Or do you provide different packages for copyless versions?
 
Or do you provide different packages for copyless versions?
Sort of. Every time someone downloads a product @ our site, the .zip file is generated from scratch in a similar way to how the XF2 add-on build process works.

In our eCommerce system, through a custom extension, I have the ability to tie a Branding Free product to its parent product. Therefore, if someone has purchased a Branding Free license (and associated the add-on product license with the parent product license), I know this when building the package.

The branding is then stripped in real-time during the download process when an associated Branding Free license is detected.

Can't go into too many details beyond that, unfortunately.
 
Any chance you could add this custom extension to the eCommerce code? Would make things really easier as always providing 2 different versions for every new product version.
 
Any chance you could add this custom extension to the eCommerce code? Would make things really easier as always providing 2 different versions for every new product version.
It wouldn't do you much good as-is, since it depends on using the "AutoGen" download method as opposed to the attachment method I presume you're using now, and requires special files to be added to the download.

That being said I'll keep this thread open in another tab, and when I have time I'll look into PMing you with a tutorial and a stripped down version of the custom code :)
 
It wouldn't do you much good as-is, since it depends on using the "AutoGen" download method as opposed to the attachment method I presume you're using now, and requires special files to be added to the download.
Nope, I´m using the AutoGen. When I have a magic toolbox at hand, why not making the most of it? ;)
That being said I'll keep this thread open in another tab, and when I have time I'll look into PMing you with a tutorial and a stripped down version of the custom code :)
That would be great, thanks. But I really would like to encourage you to add this to the eCommerce code, as this provides a functionality which many eCommerce customers could make use from.
 
That would be great, thanks. But I really would like to encourage you to add this to the eCommerce code, as this provides a functionality which many eCommerce customers could make use from.
No one would know how to use it even if I did :p

Technically the functionality does exist, as internally, the “branding_free” and “global_branding_free” columns exist on the product table.

You could update them, and write a class extension to the DownloadVersion/Generator service to read those columns.

That’s literally all the code does, there’s nothing special about it :)
 
Since you´ve now written and outlined everything what is needed (and have talked your way out of your head with "nothing special about it" 😁), there is no argument left over for you, to not include it to eCommerce 😂

Very curious how extensive the documentation will be ;)
 
Since you´ve now written and outlined everything what is needed (and have talked your way out of your head with "nothing special about it" 😁), there is no argument left over for you, to not include it to eCommerce 😂

Very curious how extensive the documentation will be ;)
I’m saying that the code would be custom to each person implementing it, and would require changes to the code being downloaded, so there’s no plans to advertise the fact that it is possible for a developer to customise the download process.

Perhaps the most important argument is that not every use case for the digital download portion of this mod is XF add-ons :p
 
Top Bottom