-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more stable theming by using includes #3450
Comments
pull requests are welcome |
@DeepDiver1975 i uploaded a proposal of how people could change the title and footer of their owncloud sites without having to update layout.xxx.php files after every owncloud update: https://github.com/webmeisterei/core/tree/improvedTheming i'm no php developer at all, so i need some help: template->incThemed is a hack, and needs to be improved by an owncloud crack. maybe the functionality to use themed tempates (if available) can be safely included into the template->inc function then. is there a changelog where you record the changes added between releases? contributor agreement is on the way |
@frisi We developed a solution in the meantime. You only have to change a new file called defaults.php to do string changes like that. I will be in 5.0.8 scheduled for release in 2 weeks. In the meantime you can check the stable5 branch. |
thanks for your quick response @karlitschek the for the footer, the approach in improvedTheming gives users a much more powerful way to customize the footer text.
in addition customizing the link or the texts could possibly break other templates using the entityname, baseurl or slogan. if people really want to customize the footer, they will still need to edit layout.guest.php (et.al) and fix them when updating owncloud (#3445) please have a look at the changes i made in the improvedTheming Branch and help me fix the include method https://github.com/webmeisterei/core/blob/improvedTheming/lib/template.php#L487 |
hi @karlitschek and @DeepDiver1975 - can you please let me know your feedback on this? |
@frisi The header and footer includes are an option. But we need a pull request as @DeepDiver1975 said. |
@karlitschek i'll happily create the pull request. in order to do that i really need your feedback on the template->improvedTheming method |
@schiesbn can you comment on this? is this solved with the new theming system? |
This should be solved in current master. With getLongFooter() you can define an arbitrary footer in your defaults.php (see: https://github.com/owncloud/core/blob/master/core/templates/layout.guest.php#L49) Sorry for the confusion, but right before the enterprise release of ownCloud5 this changed a few times. But the current implementation can be expected to be stable and should be fairly customizable. Please have a look at the current defaults.php if it suits your needs https://github.com/owncloud/core/blob/master/lib/defaults.php |
If it's fixed then also close this. :) |
thanks to the changes added in #3791 i can confirm this ticket as closed. as finding out how to apply customizations in a theme took me quite some time i'll share the code here create a ``defaults.php` file in your theme folder: <?php
class OC_Theme {
private $cloudName;
function __construct() {
$this->cloudName = "My ownCloud";
}
public function getLongFooter() {
return 'This is some long text containing <a href="#">links</a>';
}
public function getName() {
return $this->cloudName;
}
} you can look up the variables and methods that can be customized in https://github.com/owncloud/core/blob/v5.0.10/lib/defaults.php |
Hi - i tried using the code above in ownCloud 6.0.1 but could not get the cloudName to take although the footer worked great ... and while i did not truly understand (or know) what the variable |
had to change code when updating to 6.0.0, too @chuckingit: you'll need to add a getTitle() method that returns the name
in general you can check OWNCLOUD_DIR/lib/private/defaults.php for possible settings |
@chuckingit thanks. It worked perfectly in ownCloud 7! |
@chuckingit This also works in OwnCloud 8. Thanks! |
in OwnCloud 9 its not working |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
currently updating owncloud for themed sites often causes problems.
why?
more or less every minor update adds/(re)moves some javascript variables.
eg 5.0.6 which moved the requesttoken to an attribute in html (see #3445, or #3446)
using php inclues could help a lot.
how?
in my usecase - and i'm pretty sure it's the same for many others - theming owncloud is limited to different logo, css for colors and chaning the page title and the footer.
logo and css can easily be done and usually need not be changed when updating
for a different title and footer however, one needs to customize 4! different templates in the theme:
if we introduce 2 additional templates (for footer and title) that can be customized in the theme too we would profit in 2 ways
of course, we might end up having different templates for guest and user layout because the show different content.
layout.guest.php and layout.base.php could use:
layout.user.php:
The text was updated successfully, but these errors were encountered: