Quote:Just curious, why? You can set which groups can edit those awards from the ModCP, so what can be the reason to completely disable it? Maybe adding a setting will suit everybody, I see no problem.
For safety, because I myself won't be using that feature anytime as well. Hence, I just asked to send the edited file so as to you can see what changes I made.
Quote:I currently enabled HTML for award names and descriptions, only administrators can create those from the ACP so maybe there is not a real issue enabling it.
Yeah, also make sure the HTML for award reason is enabled as well.
Quote:removing the award linking to it's award id on postbit
Quote:Those are template edits , right? The upgrade script will update the master templates, you will need to use the "Find Updated Templates" feature to update your templates as you like.
No, I actually made that to plugin, so every time I activate/deactivate plugin, or uninstall/re-install, they don't get lost.
Quote:No really... useful. The new update requires a full update of all files, the plugin was almost completely rewritten for better user experience and my own code standards. This is the reason I'm asking about all the changes you did so that I can implement them (if they fit everybody) so you don't need to redone it all.
Quote:I have to admit it, the plugin is nice, but the code is a mess, completely ugly, IMO. An update is necessary.
Perhaps, some part is very hard to understand, I mean somewhere where simple functions were made complex, but yeah, that happens.
Quote:Yes, the cache system resulted to be worse that querying the DB, that is way I dropped the idea.
Great.
Quote:edit: Also, the awards has space between each, which I dislike. When I view source, each award is in the newline, which is causing that extra space. If it was adjacent and not in the newline, the space won't be there. I even edited the template with numerous hacks, and still don't work. Unsure how each award is inserted into new line, any hack possible for that? lol.
Quote:I think I know what the problem is, if you disable HTML comments from the ACP settings it should be fixed. I will update that as well so that templates don't output the HTML comments when it is really no necessary as I had done with other plugins already.
I don't think that it is the problem, as in current version (1.0.7) I don't find any HTML comments section for plugin settings, or that you are referring to something else? Correct me if I'm wrong.
edit: Ah, were you referring to: Output template start/end comments? in server & op settings? I tried disabling that, still nothing.
What I suggest that instead of creating template for this thing, I would suggest building a custom function and calling it on postbit. For example, I tried creating custom function but that only resulted in outputting one award as the cache system is bugging it:
$custom_ougc_awards_postbit = "<span style=\"white-space:normal; width: 100%;\"><img src=\"".$award['image']."\" title=\"".$award['name']."\" alt=\"".$award['name']."\" /></span>";
$post['user_details'] = str_replace("<!-- OUGC AWARDS -->", $custom_ougc_awards_postbit, $post['user_details']);
Another thing which I find not in the plugin, but still being cached and called at places is the template named: ougc_awards_image , I cannot find it anywhere but it's still being called. You may want to have a look.
Quote:You suggestions are appreciated!
Your time is appreciated, too.
Another edit: I need to actually hurry due to current situations on implementing it, so perhaps for time being, could I get the query part (which also involves ordering awards in ascending order to reflect them by dates given and not in random order, hence why cache was failing my hopes) and a hack/fix for the spacing issue? Would really appreciate it. That's the only two things which are bugging the hell out of me, right now, haha.
Important things starts here Wrote:edit #3: I finally figured out a way to remove the space by removing the use of templates. I commented where you were evaluating 'postbit_ougc_awards' function and instead I'm now using:
$post['ougc_awards'] .= "<img src=\"".$award['image']."\" title=\"".$award['name']."\" alt=\"".$award['name']."\" />";
Which now remove extra white-space between the awards, please do correct me if the way I'm doing is wrong and not proper as I'm running out of ideas of what more I could do, lol.
If it's fine, then, now I only need the query part quickly so I can sort awards by date given.
edit #4: Okay so I rewrote the whole postbit function by removing the use of cache and using a query instead, and it seems to work fine, still testing though. So all issues I had are mostly solved. Let me know if you want me to post the postbit function I wrote.
But that runs quite queries, however, I'm now working on implementing cache to it if possible and then query the database, let's see if it works out. Will post an update.