2015-05-24, 02:29:40
(This post was last modified: 2019-03-08, 22:18:45 by datiswous.
Edit Reason: imported attachment json code inside post
)
The WJ Notepad plugin shows a Fancybox with (editable) content, but it is not re-sizable (and a bit small) by default.
With the following edit and use of GS Custom Settings plugin you can re-size the Fancybox:
Somewhere (between line 63-65) in the plugin's wj_notepad.php you see the following code:
You change 400 to:
<?php get_setting('wj_notepad_size','height'); ?>
and 707 to:
<?php get_setting('wj_notepad_size','weight'); ?>
So it looks like this:
Save the following code as wj_notepad_size_data.json and import it in the admin of GS Custom Settings:
You can then, in the admin of GS Custom Settings change height and weight of the Fancybox, by number, but without px after it.
EDIT: When this hack is done, disabling the plugin GS Custom Settings gives you a white screen of death. To fix this, delete the notepad.php plugin file.
With the following edit and use of GS Custom Settings plugin you can re-size the Fancybox:
Somewhere (between line 63-65) in the plugin's wj_notepad.php you see the following code:
Code:
|false|400|elastic|function|ajax|data|autoDimensions|autoScale|ready||document|autoSize|height|type|notepadmodal|transitionIn|width|707|fancybox|
You change 400 to:
<?php get_setting('wj_notepad_size','height'); ?>
and 707 to:
<?php get_setting('wj_notepad_size','weight'); ?>
So it looks like this:
Code:
|false|<?php get_setting('wj_notepad_size','height'); ?>|elastic|function|ajax|data|autoDimensions|autoScale|ready||document|autoSize|height|type|notepadmodal|transitionIn|width|<?php get_setting('wj_notepad_size','weight'); ?>|fancybox|
Save the following code as wj_notepad_size_data.json and import it in the admin of GS Custom Settings:
Code:
{
"tab": {
"lookup": "wj_notepad_size",
"label": "WJ Notepad Size"
},
"settings": [
{
"lookup": "height",
"value": "400",
"type": "text",
"descr": "",
"access": "normal",
"label": "Height",
"langs": false
},
{
"lookup": "weight",
"value": "707",
"type": "text",
"descr": "",
"access": "normal",
"label": "Weight",
"langs": false
}
]
}
You can then, in the admin of GS Custom Settings change height and weight of the Fancybox, by number, but without px after it.
EDIT: When this hack is done, disabling the plugin GS Custom Settings gives you a white screen of death. To fix this, delete the notepad.php plugin file.