Re: [Tiki-devel] Creating custom theme with options (Fix inside)
Karsten Wemheuer via TikiWiki-devel <[email protected]> Fri, 06 Jun 2025 19:02:09 +0200
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
--=-cDFnw8zQspCBlHljnS5m
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi,
thanks for the pointer. I finally found the error. That weird path with
the missing / is produced in tiki-tc.php, line 57.
original:
$headerlib->add_cssfile("{$tc_theme_path}css/{$tc_theme_option}.css");
fixed:
$headerlib->add_cssfile("{$tc_theme_path}/css/{$tc_theme_option}.css");
I have included a patch. The solution works for me. But I don't know if
it has unintended side effects.
I compared the file from tiki 27.2 with tiki 28.3. As they are
identical, I assume the patch works for Tiki 27 and Tiki 28.
Best regards
Karsten
Am Donnerstag, dem 05.06.2025 um 17:54 -0400 schrieb Benoit Gr=C3=A9goire:
> On mardi 3 juin 2025 18 h 02 min 29 s heure avanc=C3=A9e de l=E2=80=99Est=
Karsten
> Wemheuer via TikiWiki-devel wrote:
> > the generated file is correctly located as You mentioned. Where
> > should
> > I look for a bug in the code? Where is the url generated?
>=20
> In themelibl.php, getThemeCssFilePath() or getThemePath()
>=20
>=20
> --=20
> Benoit Gr=C3=A9goire
--=-cDFnw8zQspCBlHljnS5m
Content-Disposition: attachment; filename="fix-broken-options-path.patch"
Content-Type: text/x-patch; name="fix-broken-options-path.patch"; charset="UTF-8"
Content-Transfer-Encoding: base64
ZGlmZiAtTnJ1IHRpa2ktMjcuMmEvdGlraS10Yy5waHAgdGlraS0yNy4yYi90aWtpLXRjLnBocAot
LS0gdGlraS0yNy4yYS90aWtpLXRjLnBocAkyMDI1LTAzLTI2IDIyOjE4OjAxLjAwMDAwMDAwMCAr
MDEwMAorKysgdGlraS0yNy4yYi90aWtpLXRjLnBocAkyMDI1LTA2LTA2IDE4OjQxOjQwLjIyNTky
NDY4MyArMDIwMApAQCAtNTcsMTEgKzU3LDExIEBACiAgICAg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gICAgICAkaGVhZGVybGliLT5h
ZGRfY3NzZmlsZSgkdGNfbWFpbl9jdXN0b21fY3NzLCA1Myk7CiAgICAgICAgICAgICB9Cg==
--=-cDFnw8zQspCBlHljnS5m
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--=-cDFnw8zQspCBlHljnS5m
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
--=-cDFnw8zQspCBlHljnS5m--