Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - CerealGuy
181
All old plugins should still work. This just gives a lot more possibilities to plugin devs.
182
Everything's now working, awesome :cool:.
Thank you so much @Nao, i totally love wedge :D
183
Features / Re: New revs
« on December 30th, 2014, 03:22 PM »
Perhaps you should permit people to reply on this topic. I dont think that it needs "life", its only to keep track of new commits. In my opinion bugs should be discussed in an own topic.
184
Features / Re: New revs
« on December 30th, 2014, 12:47 PM »
@Freñiçh
Use the commit before or change 'Subs-MinifyPHP.php' to 'Subs-CachePHP.php'. Also you can delete the Subs-MinifyPHP.php file.
185
Looks like you missed to change the require in Subs-Template.php
Line 1129
require_once(APP_DIR . '/Subs-MinifyPHP.php');

In the moment i dont have much time, but theres something wrong in apply_plugin_mods.
Code: [Select]
// Phase 1: Waste no time if no plugins are enabled.
if (empty($my_plugins) && empty($settings['enabled_plugins']))
return;

if (empty($my_plugins))
$my_plugins = $settings['enabled_plugins'];

$this_file = $error = false;
foreach ($context['enabled_plugins'] as $plugin)

foreach loop uses $context, but i think you want to use $my_plugins. Also it generates an error, which wedge isnt able to catch. But my errror.log says "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /usr/share/nginx/www/wedge/core/app/Subs-CachePHP.php on line 189
". Also my_plugins is a string, so some split is needed.
186
I vote for the first because as an administrator you have a bit more control about it (you could also rename the plugin, but Settings.php is also a nice way to modify it quickly) and in general its more clear if you look at Settings.php and see all enables plugins and not just some of them. Think about someone who edits Settings.php and wonders why there are only some of his enabled plugins. Also the file_exists thing doesnt need that much time that you have to care about it, plus its more fail resistant.

Interesting way to solve the problem, i like it :cool:
187
Plugins / [Plugin] CountLikes
« on December 27th, 2014, 06:43 PM »
This Plugin basically shows in profile summary how many likes this user gave/receieved. You can also view those posts.

https://github.com/C3realGuy/CountLikes
188
I went threw different "solutions" for this but didnt find one with which i was really happy ^^.
The one which I like the most in the moment needs a bit more to change, but it would reduce some I/O tasks. But here some ideas:
1) I would get enabled_plugins always via sql, no need for cached settings, but move it in an own table. We could also build this sql query without Class-DB so no need for a loadSource or a require (dont really like this but how else could you load Class-DB without any "depend" problems?!).
2) When going through those plugins we could already check if any of them has mods.xml and if yes which files are interesting. With this information we dont need to open mods.xml for every plugin when calling apply_plugin_mods.
3) Create a global $mods array which knows which plugin modifies which file. apply_plugin_mods would not need to know enabled_plugins anymore. $mods['pluginpath'] = array('pluginname', array(file1, file2...)). And if $mods is empty, apply_plugin_mods can return.

Just some quick ideas, perhaps its just brainshit, its already late i think :D
And i think this should be in bugs, dont know why the hell i opened this thread under plugins :hmm:.

Hope you had some good time with your family? For me its always a bit stressful, and too much food ^^
189
Currently you cant modify Files like Class-System,QueryString,Subs,Errors,Load etc. because $context['enabled_plugins'] isnt inited yet. Perhaps that should be done before loadSource ever got called?!
190
Support / Re: horizontal screen size
« on December 26th, 2014, 08:45 PM »
Setting width for .postarea article did it for me. In my case its 700px, but im using a custom skin so might be different for the other skins.
191
Archived fixes / Template modification not working
« on December 23rd, 2014, 10:47 PM »
Template modifications via plugin arent working because apply_plugin_mods only gets called when core file is newer than the cached file or the cached file doesnt exist. I'm not 100% sure, but probaby some template cache flushing is needed when enabling a plugin :hmm:.

EDIT:
ManagePlugins.php, clean_cache('php', '', CACHE_DIR . '/html'); is needed in enable and disable plugin. Than it works correctly. But why do you clean everything?
But here two improvements:
1. If plugin has no mods.xml you dont need to clean the cache
2. Only delete files which are in mods.xml

https://github.com/C3realGuy/wedge/commit/5483d6291ea16aac7ffaf88653b2cc0b2e2f78dc
192
Support / Re: horizontal screen size
« on December 22nd, 2014, 07:19 PM »
Hmm tried that in topic.js, didnt work for me. Its an annoying bug, but firefox is my favourite browser because of its usability...
193
Bug reports / Re: Turkish Character in Mail Bug
« on December 20th, 2014, 03:25 PM »
It looks like sendmail ignores $send_html?! I dont know much about html, but shouldnt the mail app convert html entities back to utf-8 chars?!
194
Development blog / Re: The obligatory Christmas update.
« on December 10th, 2014, 10:44 PM »
Tested before, after and replace. Looks like all of them work like they should. Good to know that cdata stuff, had a quick look at some SMF mods today and noticed that tag.

To that template stuff, what do you think about storing for example profile fields for summary in an array which the template just itterates through? In my opinion hard coding all fields is not really nice.

Code: (Profile.template.php) [Select]
// What about if we allow email only via the forum?
if ($context['member']['show_email'] === 'no_through_forum' || $context['member']['show_email'] === 'yes_permission_override')
echo '
<li><a href="<URL>?action=emailuser;sa=email;uid=', $context['member']['id'], '" title="', $context['member']['show_email'] == 'yes_permission_override' ? $context['member']['email'] : '', '" rel="nofollow"><img src="', ASSETS, '/email_sm.gif" alt="', $txt['email'], '"></a></li>';

// Don't show an icon if they haven't specified a website.
if ($context['member']['website']['url'] !== '' && !isset($context['disabled_fields']['website']))
echo '
<li><a href="', $context['member']['website']['url'], '" title="', $context['member']['website']['title'], '" target="_blank" class="new_win"><img src="' . ASSETS . '/www_sm.gif" alt="', $context['member']['website']['title'], '"></a></li>';
         ........

With an "profile_summary_array" it would need less code and not so many if queries and it would be easier to modify it via mod/hook.
195
Plugins / [Mod] MinSearchLength
« on December 10th, 2014, 10:19 PM »
The default minimal length for words is 2, which sometimes is not short enough (think about movie names, numbers...).
With this mod you can change that number to whatever you want.

https://github.com/C3realGuy/we_MinSearchLength