PDA

View Full Version : GAZ 1.0.0 beta 1 feedback and suggestions from Milad


Milad
03-26-2007, 06:04 PM
Installation process:
- As of vB 3.6 you can add the cron job in the XML product file, I didn't like the fact that I had to setup a cron job manually while that can be done via XML file.

readme.html file:
correct the path: http://www.yoursite.com/forums/geek/gaz/cron/gaz_send_cron.php to http://www.yoursite.com/forums/geek/gaz/cron/gaz_send.php


Settings:
- I found my personal email in Reply address setting, and this must be the default one of the forum $vbulletin->options['webmasteremail']
- Style and user information (Style, Userid and User Name): Here it's better to use the own setting for each user, and it's better to send the newsletter from the default email $vbulletin->options['webmasteremail'] not from the admin membership.

Newsletters:
- It's better to determine the scheduled time for each newsletter while adding or editing it not via the cron job which have to run to decide if it's the time to generate an issue or not. (I figured out later, this can be set in generators section)
- timing could be daily, weekly, biweekly and monthly .. etc.

Issues:
- Management here is good.

Generator:
- Management here is good.

Found errors:
- In Generators section, I chosen Preview last HTML issue, then new window popped up with this url http://www.syrianmeds.net/forum/.php?id=1&prev=1
- Also the link for Plain Text preview is http://www.syrianmeds.net/forum/?settings[scriptname].php?id=1&txt=1&prev=1
- The previous problems disappeared in newly generated issues, I think it's default data problem.
- In modules section, I receive this warning: Warning: Missing argument 5 for run_mod() in /geek/gaz/includes/gaz_class_core.php on line 226
- In Plain Text preview, there are HTML code.
- In sending section for an issue I had this error Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22
- While you add a module to module set, if you set an order, it won't be set, you have to right it in order field and save again.

Sent HTML issue:
- It must have the HTML direction is wrong, it's ltr while my forum is rtl
- I choose not to show replies and views but their fields are still exist as empty fields.
- some parts don't obey right-to-left standards.

Notes:
- templates have to be grouped in the admincp

KirbyDE
03-26-2007, 09:01 PM
Settings:
- Style and user information (Style, Userid and User Name): Here it's better to use the own setting for each user, and it's better to send the newsletter from the default email $vbulletin->options['webmasteremail'] not from the admin membership.

The sender eMail should indeed be configurable.
Also, it might be a good idea to offer 'Use User Style' as an option, although this will cause more processing.


Found errors:
- In Generators section, I chosen Preview last HTML issue, then new window popped up with this url http://www.syrianmeds.net/forum/.php?id=1&prev=1
- Also the link for Plain Text preview is http://www.syrianmeds.net/forum/?settings[scriptname].php?id=1&txt=1&prev=1

This has already been reported: http://www.thevbgeek.com/tracker/index.php?cmd=view&id=329


- In modules section, I receive this warning: Warning: Missing argument 5 for run_mod() in /geek/gaz/includes/gaz_class_core.php on line 226

This has already been reported: http://www.thevbgeek.com/tracker/index.php?cmd=view&id=333

The Geek
03-26-2007, 11:04 PM
Thanks for taking the time to write this up Milad, it really helps!

Installation process:
- As of vB 3.6 you can add the cron job in the XML product file, I didn't like the fact that I had to setup a cron job manually while that can be done via XML file.


There are 2 cron jobs: 1 for the generators, 1 to send out mail. THe generator cron job is done via the install, however I dont link the send cron to vB's system because there is FAR too much processing to do for vB's schedule task system.

There is no other way around this (other than sending the emails out manually which I have made pretty automated too).


readme.html file:
correct the path: http://www.yoursite.com/forums/geek/gaz/cron/gaz_send_cron.php to http://www.yoursite.com/forums/geek/gaz/cron/gaz_send.php


Thanks :)


Settings:
- I found my personal email in Reply address setting, and this must be the default one of the forum $vbulletin->options['webmasteremail']

- Style and user information (Style, Userid and User Name): Here it's better to use the own setting for each user, and it's better to send the newsletter from the default email $vbulletin->options['webmasteremail'] not from the admin membership.


Good point - however here is the real crux... if the style is per the users settings... it could potentially be a WHOLE lot of additional processing. I suppose the way to do it would be to pre-parse each potential style (escaping the user specific variables like $user). That would work a little bit better.


Newsletters:
- It's better to determine the scheduled time for each newsletter while adding or editing it not via the cron job which have to run to decide if it's the time to generate an issue or not. (I figured out later, this can be set in generators section)


Yes, the vB cron job for running the generator uses the generators time and frequency setting to create new issues. The send cron sends whatever outstanding issues it can find.


Found errors:
- In Generators section, I chosen Preview last HTML issue, then new window popped up with this url http://www.syrianmeds.net/forum/.php?id=1&prev=1
- Also the link for Plain Text preview is http://www.syrianmeds.net/forum/?settings[scriptname].php?id=1&txt=1&prev=1
- The previous problems disappeared in newly generated issues, I think it's default data problem.
- In modules section, I receive this warning: Warning: Missing argument 5 for run_mod() in /geek/gaz/includes/gaz_class_core.php on line 226
- In Plain Text preview, there are HTML code.
- In sending section for an issue I had this error Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22
- While you add a module to module set, if you set an order, it won't be set, you have to right it in order field and save again.


Thanks!


Sent HTML issue:
- It must have the HTML direction is wrong, it's ltr while my forum is rtl


I had to add a forced setting to make it LTR because the cron was defaulting to RTL (because no user was actually loading it, there was no defualt language direction in vB). I just didnt put the option in to toggle RTL on of off :)


- I choose not to show replies and views but their fields are still exist as empty fields.

Try a different template style (i.e. simple threadlist instead of threadlist)

Thanks again for your feedback. It helps loads :D

Milad
03-27-2007, 02:54 AM
There are 2 cron jobs: 1 for the generators, 1 to send out mail. THe generator cron job is done via the install, however I dont link the send cron to vB's system because there is FAR too much processing to do for vB's schedule task system.

There is no other way around this (other than sending the emails out manually which I have made pretty automated too).

I faced something like that before, I had to run a maintenance script once per hour, I wasn't able to do that via CPanel, because wget is denied, I made a plug-in (via cron_script_cleanup hook) that can be run via vB's crons, it was like this:

$getthisfile = file('http://PATH TO /maintenance.php');
unset($getthisfile);

You can add this in small file to handle the mission.

because no user was actually loading it, there was no default language direction in vB

But there is a default language that has a direction, you can use it. I think this is better than toggle option.

Try a different template style (i.e. simple threadlist instead of threadlist)
Yes I tried this, it's better.

Can you add an option to use the actual header and footer and navbar in the newsletters?

I'm waiting for beta 2

Thanks

The Geek
03-27-2007, 08:15 AM
Hey Milad,

The problem isnt in finding a place with vB's cron job - it is the way that vBs heduled task system works. vb's heduled task is not a real cron - it runs off the back end of another user. There is a web site that you can schedule tasks on for free. Basically you register the URL and time with the site and it calls the script at that time. That would be the best way forward. Maybe Kirb has another idea.

It was much more complex than that. I too assumed that would be the case, but it was a challenge to load up a mock user, language and style via a cron and via a normal page. The interim solution is a setting.

I wont be adding the option for the regular header and footer simply because it will consist of sending javascript files and functions too. I suspect there could be serious problems with that - maybe Kirby can comment?

KirbyDE
03-27-2007, 09:24 AM
I see no real problem with running a heavy processing script through vB Cron Jobs. They are triggered via a 1 Pixel Image, so they don't really affect the browsing user triggering execution.

Things to keep in mind though: It might be necesary ton increase max_execution time and ignore user abort.
Also, if processing takes > 1 minute (which is probably the case) it might be necessary to build the next execution time before the end of script execution, so it does not run into race conditions.

Milad
03-27-2007, 01:59 PM
I assure I understand how vB's crons work, via that 1 pixel image which is cron.php?cronid=XX. me too, don't see a real problem with running a heavy processing script through vB Cron Jobs.

Best regards

Milad
03-27-2007, 02:02 PM
I wont be adding the option for the regular header and footer simply because it will consist of sending javascript files and functions too. I suspect there could be serious problems with that - maybe Kirby can comment?

So I have to drop those files and functions from my header and footer, then to replace the GAZ templates with them.

What is about automated dropping process?

The Geek
03-27-2007, 02:45 PM
The GAZ header and navbar use most of the default header. The navbar is slightly different as it doesn't contain any javascript menus, nor irrelevant items. Customising it is pretty straight forward and simple.

As for the cron job - I have never seen anything apart from caution from vb staff about its cron jobs being used for massive tasks - hence my hesitation from utilising vBs scheduled task system for this purpose. TBH it is easier to set it up as a cron job (it originally was) so I assume that it will get folded back in.

Milad
03-28-2007, 03:15 PM
I browse to the file gaz_send.php and I get this repeated error:

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Warning: Missing argument 1 for gaz_class_cron() in /geek/gaz/includes/gaz_class_cron.php on line 22

Milad
03-28-2007, 03:16 PM
question: does GAZ send emails via SMTP?

The Geek
03-28-2007, 03:35 PM
Currently only vai PHP's mail function though we will be adding support for additional configurations

Milad
03-28-2007, 03:39 PM
how much emails does GAZ send per a request to the cron file?

Also, I can't edit the module set for a generator, after I choose another set and save, I reedit it to find the default set.

Milad
03-28-2007, 03:42 PM
I suggest to use vbmail(), so If the admin uses SMTP in his configuration like me, mails will be sent via SMTP.

Another thing, I think it's better to use vb's mail queue which is sent on patches, or please put an option for using it.

The Geek
03-28-2007, 04:11 PM
Batches are sent using the setting in your settings :D

The reason why we wont be going via vbmail is because we may be extending the class.

Milad
03-28-2007, 09:57 PM
Batches are sent using the setting in your settings

The important thing is the mail queue not the batches.

Currently only vai PHP's mail function though we will be adding support for additional configurations
The reason why we wont be going via vbmail is because we may be extending the class.

Why you don't extend vB_Mail class and use the resulted extension class?

The Geek
03-29-2007, 08:06 AM
Why are the ques important? From what I can tell, when using qeues, the emails get put in the db, then pulled out again at a later date and then sent one at a time. Im not sure I see the major difference between a batch and a qeue in this situation. You are not saving any additional 'mail time'.

There was discussion about supporting additional features (i.e. sending images out as attachments).

mhc1576
03-29-2007, 04:51 PM
Well,

My host only allows 50 emails in an hour to prevent SPAM so then a que is vital.

The Geek
03-29-2007, 05:30 PM
My point is that the system is not much different that a giant qeue. You would make your settings 50 and then have a cron job run every hour :)