@peregrine said:
just to clarify for me and others hgtonight
Is this what you mean
class ABC implements Gdn_IPlugin {
needs Setup and Disable functions
vs.
class DEF extends Gdn_Plugin {
doesn't need Setup and Disable functions
I just looked at the source code to make sure I wasn't leading you astray. In Vanilla 2.1, you need to define a Setup() method to implement the Gdn_IPlugin interface. I.e. class ABC implements Gdn_IPlugin. You do not need to declare a Setup() method when extending Gdn_Plugin: i.e. class DEF extends Gdn_Plugin. The setup method is executed when you enable the plugin in the dashboard.
You may define a OnDisable() method. This will be executed when you disable the plugin via the dashboard.
Sorry for the confusion, as some things have changed.
I just looked at the source code to make sure I wasn't leading you astray. In Vanilla 2.1, you need to define a Setup() method to implement the Gdn_IPlugin interface. I.e. class ABC implements Gdn_IPlugin. You do not need to declare a Setup() method when extending Gdn_Plugin: i.e. class DEF extends Gdn_Plugin. The setup method is executed when you enable the plugin in the dashboard.
You may define a OnDisable() method. This will be executed when you disable the plugin via the dashboard.
it all corroborates now!
class MobileThemeHooks implements Gdn_IPlugin {
does not have a OnDisable() method.
but it does have public function Setup() { }
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Interfaces and inheritance are two facets of object oriented programming (OOP).
Knowing a class implements an interface and knowing the interface lets you isolate functionality without knowing what is actually happening. For more information specific to PHP, check out http://www.php.net//manual/en/language.oop5.interfaces.php
public function CategoriesController_Render_Before($Sender) {
$this->_AddFontCSS($Sender);
}
to
public function CategoriesController_Render_Before($Sender) {
$this->AddFontCSS($Sender);
}
and then parse since its now getting four meta values.
I considered doing that originally. The current version only pulls in data when on a useful page (and even then, just one query).
It might be better to request '%' on the profile edit page. It sucks that SetMeta auto prefixes but GetMeta won't remove the prefix. Brings a dependency on the Plugin name.
let me know if it ss ok with you and I'll will try to attach a zip file with my changes here if I have permission to do so or if the browser lets me. (I've had troubles uploading zips in discussussions in recent times, not sure if it is just me or a permission problem or a bug or the browser).
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine
Sounds good! I haven't been following this last round of revisions as closely, because my users just use ctrl +/- to adjust screen displays, but I can certainly stick it into the addon as an option.
this is the zip formatted and with css files (you might want to play with them) and formatted default,php with font size option.
After you download this DoyceT and you upload new version with fonts or modify it, you can contact a moderator to delete this zip, so users get the new version from add-ons area instead.
Comments
I just looked at the source code to make sure I wasn't leading you astray. In Vanilla 2.1, you need to define a
Setup()
method to implement theGdn_IPlugin
interface. I.e.class ABC implements Gdn_IPlugin
. You do not need to declare aSetup()
method when extendingGdn_Plugin
: i.e.class DEF extends Gdn_Plugin
. The setup method is executed when you enable the plugin in the dashboard.You may define a
OnDisable()
method. This will be executed when you disable the plugin via the dashboard.Sorry for the confusion, as some things have changed.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
it all corroborates now!
class MobileThemeHooks implements Gdn_IPlugin {
does not have a OnDisable() method.
but it does have public function Setup() { }
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Interfaces and inheritance are two facets of object oriented programming (OOP).
Knowing a class implements an interface and knowing the interface lets you isolate functionality without knowing what is actually happening. For more information specific to PHP, check out http://www.php.net//manual/en/language.oop5.interfaces.php
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
and then add (add what other elements you want to change size of
CustomHomepage/design/chp_large.css
and
CustomHomepage/design/chp_small.css
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Looks like I've got some things to test in the morning.
I would not bother to change each one, if you use body it will simply enlarge all the elements 80% more than their values.
the smallest font will only get 80% larger than say 9px making it still small but readable along with the rest of it.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
this needs to be removed from the above code
var_dump($FontSize);
http://vanillaforums.org/discussion/comment/210275/#Comment_210275
I know you know css V, But...
I'll believe you after you test the actual plugin with bittersweet with your modified and posted
CustomHomepage/design/chp_small.css
CustomHomepage/design/chp_large.css
after looking at discussions page, categories page, and a discussion page.
since
was 1/2 red-herring and you can test by playing the real outcome with web-designer.
http://vanillaforums.org/discussion/comment/210261/#Comment_210261
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
No not herring, just needed to add a:link so it works for the titles, try with this
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder
did you try it? doesn't look good in table view.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I still also wonder if it would be faster or better to pull in all wildcarded values
GetMeta($this->User->UserID, Plugin.CustomHomepage.%',
and this bug I added needs to be changed
from:
and then parse since its now getting four meta values.
CustomHomepage/design/chp_small.css
and CustomHomepage/design/chp_large.css
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I guess switching font size is not as easy as switching font family....
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I considered doing that originally. The current version only pulls in data when on a useful page (and even then, just one query).
It might be better to request '%' on the profile edit page. It sucks that SetMeta auto prefixes but GetMeta won't remove the prefix. Brings a dependency on the Plugin name.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@DoyceT
let me know if it ss ok with you and I'll will try to attach a zip file with my changes here if I have permission to do so or if the browser lets me. (I've had troubles uploading zips in discussussions in recent times, not sure if it is just me or a permission problem or a bug or the browser).
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine
Sounds good! I haven't been following this last round of revisions as closely, because my users just use ctrl +/- to adjust screen displays, but I can certainly stick it into the addon as an option.
apparently I might have succeeded with chrome.
fingers crossed.
@DoyceT
this is the zip formatted and with css files (you might want to play with them) and formatted default,php with font size option.
After you download this DoyceT and you upload new version with fonts or modify it, you can contact a moderator to delete this zip, so users get the new version from add-ons area instead.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
did you ever try the font size deal? or decide it wasn't worth the trouble for you site's needs
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I haven't implemented it yet. The learning curve for the users getting to pick their own layouts has kept me... pretty occupied since I turned it on.
Some days, it's hard to remember I volunteered for this...