Closed alain01 closed 2 years ago
If you want to extract all the HTML/CSS code and make it a real Smarty template, please do - it would be awesome :)
You can then place it in /templates/class/common/
haaaaa ok ! I understand now ! The construction of the file is done here! Ok, I'm working on it... 2 times hehe, 1 time to correct the problem Then 1 time to try to turn in real template
Another question linked: How could I guess that the rendering construction was done in class/common/Blockadmin.php? I don't see any reference in /admin/blocksadmin.php
If you want to extract all the HTML/CSS code and make it a real Smarty template, please do - it would be awesome :) You can then place it in /templates/class/common/ I need an example to understand how to "call" the file. Not for the template, but the code to call this template and where to put this code. And I believed admin templates were in /templates/admin, no ?
Humm, A lot of new concepts for me, but yes, I am willing to help. I know it's taking you a while to explain, so do what you can.
You need to pay attention to the namespaces, which are indicated in this case by the "use" word:
use XoopsModules\Tag\{
Common\Blocksadmin,
Helper
};
Here we are saying that we want to use "our" namespace, i.e. "XoopsModules\Tag\" which points to the /class folder (that's our convention).
We're also saying that within this namespace, we want to use classes from these files:
/Common/Blocksadmin.php
/Helper.php
which translates to:
/modules/tag/class/Common/Blocksadmin.php
/modules/tag/class/Helper.php
And then, when we say:
$blocksadmin = new Blocksadmin($xoopsDB, $helper);
we are instantiating the class Blocksadmin and use it.
If you want to understand more the concept of Namespaces, you can read some of the tutorials:
https://www.sitepoint.com/php-53-namespaces-basics/
https://www.phptutorial.net/php-oop/php-namespace/
https://code.tutsplus.com/tutorials/php-namespace-tutorial-the-basics--cms-35583
https://www.thoughtfulcode.com/a-complete-guide-to-php-namespaces/
closed by this merge https://github.com/mambax7/tag/pull/20
Hi I didn't find the blockadmin template, I did see the php file (/admin/blocksadmin.php) but I can't change it.
The problem is the space link between 2 links
Sorry, I want to propose PR but I dont know if there is no templates. I see the code
and
but I don't know what to do with it...