Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 


       myfreeforum.org Forum Index -> Web page/template Editing
Hashim

Less-Detailed Macros To Be Added

This is a thread made listing macro changes to be made, for admins to make some of the macros in the forum coding less detailed and contain only the info they need to contain, such as the time, year, date, etc. I've made this thread because admins asked me to post macros that need changing or editing in this way, and I thought it would be more organized in its own seperate thread. Also, other forum-owners can post their own suggestions for macros, too. The admins are free to change the title of tis thread into whatever they feel will make it easier for others to search for it or explain the thead better.

Macros To Be Modified/Added:

{LAST_VISIT_DATE}

Current value is "You last visited on 26 Dec 2011 09:03 pm". This should be just the DATE of the last visit, without any text or time in it. It can then be modified by forum owners into things like "Welcome! You last visited the forum on {LAST_VISIT_DATE}." Basically, gives more control and flexibility for forum owners by allowing them to edit what welcome message they show visitors whilst telling them what date they last visited. Also, the time of the last visit should be made into a seperate macro (see below).

{LAST_VISIT_TIME}

Currently the time of a user's last visit is shown with the LAST_VISIT_DATE macro. This should be made a seperate macro because forum owners may not want to show the time in the last visit date information, it is not always needed and sometimes just clogs up space. Having time and date in their own seperate macros allows greater flexibility for forum owners to be able to choose whether to include both date and time of a user's last visit or just one of those. The macro should contain nothing other than the time: 10:56 PM. No other text or information.

{CURRENT_TIME}

Currently this shows the value of "The time now is 26 Dec 2011 10:56 pm". Same as with {LAST_VISIT_TIME} this should ONLY include the current time: 10:56 PM. Year and exact date of should be in a seperate macro. This is because forum-owners may not always want to show the data and date in the same place, or may only wish to show one, not both. Current date and year should be shown in a seperate macro.

{CURRENT_DATE}

See above. Even better would be another macro showing just the current year, so year is seperate from everything else, and once again, it is upto the forum owner whether to display this or not.

The above four are the only macros I can think of right now that need to be edited or created, hopefully the admins will take in all of my suggestions, I do sincerely feel they will help make MFF better by increasing the amount of flexibility an advanced forum owner can have with their own forum.
myff admin

I will add these in some form or another, but what has been ignored here is formatting.

e.g. board config has a date format string:

Code:

D M d, Y g:i a


which is used for dates, this is used throughout the forum, but there is no time format equivalent.

So possibilities are:

1) Ignore the issue and hard code time format.
2) Add a new time format line in admin configure.
3) Add seperate time and date formats into the OPTIONS portal where we generally add extra general config options.
4) Make the macros "raw" datetimes and let the advanced user, user jquery/javascript to deal.

right now option 3 makes sense to me. But what we do we will be stuck with, so some mulling over is needed.
Hashim

myff admin wrote:
I will add these in some form or another, but what has been ignored here is formatting.

e.g. board config has a date format string:

Code:

D M d, Y g:i a


which is used for dates, this is used throughout the forum, but there is no time format equivalent.

So possibilities are:

1) Ignore the issue and hard code time format.
2) Add a new time format line in admin configure.
3) Add seperate time and date formats into the OPTIONS portal where we generally add extra general config options.
4) Make the macros "raw" datetimes and let the advanced user, user jquery/javascript to deal.

right now option 3 makes sense to me. But what we do we will be stuck with, so some mulling over is needed.


Number 2 appears to me to the most forum-owner-friendly - if it is set as it's own option in the Admin Pnael a forum-owner won't have to know any sort of code to edit the time format to how he wants it to be seen. I vote for number 2, think it's the best option tbh.
myff admin

The most forum owner friendly thing is not to add extra options that they will never use to the main admin screen!

Too many computer programs have gone down the road of doing that, consider that you are the first forum owner out of 20,000+ to ask for this feature! So how is it friendly for your options to be in the face of all the other forum owners?

Option 3, keeps advanced features in an advanced admin area.
Hashim

myff admin wrote:
The most forum owner friendly thing is not to add extra options that they will never use to the main admin screen!

Too many computer programs have gone down the road of doing that, consider that you are the first forum owner out of 20,000+ to ask for this feature! So how is it friendly for your options to be in the face of all the other forum owners?

Option 3, keeps advanced features in an advanced admin area.


If you are going to go by the rule of not confusing your users with extra optins in the Admin Panel, then surely the Date format shouldn't be there, either? As far as I know no other forums offer that option in the Admin Panel. So it's the same thing having Time as it is Date, only one more option, and forum-owners that don't know what it does aren't required to mess around with it anyway, it is just easily accessible for advanced forum-owners.

Tbh with you I don't really understand how the Portals work. I had a look at the Options portal, as well as tried to understand what the portals do, but didn't get far to be honest. If it's not too much trouble, please, could you explain what the Portals do please, and how they work?
Bravo

Hashim wrote:
If it's not too much trouble, please, could you explain what the Portals do please, and how they work?


Here is a portals guide which also links to other guides that are available.  As it is a separate question, it would be better if you posted in a new thread for this guidance as it keeps this thread less cluttered and makes it easier for people using search in future.  That way you could then say how far you got, and what confused you, as we have no idea what you understand and what you do not.
myff admin

I'd recommend reading howtodoit for information on portals.

As for not having the data format where it is, well I'd agree apart from the fact that that is where the date format has always been in phpbb2!
So we would confuse anyone who has previously used phpbb2 if we moved it.
Hashim

myff admin wrote:
I'd recommend reading howtodoit for information on portals.

As for not having the data format where it is, well I'd agree apart from the fact that that is where the date format has always been in phpbb2!
So we would confuse anyone who has previously used phpbb2 if we moved it.


Exactly, it's always been there, without a problem. Forum-owners who don't know what it does tend to stay well alone, and it is easily accessible to more advanced forum-owners, that's how it's always been. Why not do the same with the Time format? Adding an extra field in General Configure will really make no difference to those who don't know what it is, whilst it will be usefully east to get for advanced forum-owners. Do you see what I mean?
myff admin

The more options you add, the more intimidating an interface is to new owners.

There are over 40 options in admin configure already, and that is bad enough.
Hashim

myff admin wrote:
The more options you add, the more intimidating an interface is to new owners.

There are over 40 options in admin configure already, and that is bad enough.


I understand what you mean, but another one just below the Date format one isn't really going to be the difference between a forum-owner going crazy and deciding to shut down his forum because he doesn't understand anything. If you're still worried about a forum-owner becoming put-off or intimidated or anything like that,  although I personally don't think it will be a problem, all it will need a small line telling the user that the field is optional and doesn't need to be changed. This can be placed where the Date format currently says "The syntax used is identical to the PHP date() function." As soon as a forum-owner knows it optional and he doesn't need to change it at all to have his forum running well, then that will be the end of any worries he might have had.
Ask Mr. Religion

All good changes.

AMR
Hashim

Ask Mr. Religion wrote:
All good changes.

AMR


Do you mean the above will be good changes if they are changed? Thank you, I agree. Now I just hope that the admins do implement them.
Bravo

I wonder if it would be possible to have a new section clearly labelled as 'advanced'.  Most forum users would consider that the section where they could break stuff and thus leave well alone, while those wanting more options for their forum are also catered for.

However, I have no idea how much work that would take, and to be perfectly honest what you get from MFF as a free forum provider especially on phpbb2 is by far superior than any other free forum service and I have yet to see a paid forum service that even comes close, so it should all be taken in perspective really.
Ask Mr. Religion

Hashim wrote:
Ask Mr. Religion wrote:
All good changes.

AMR


Do you mean the above will be good changes if they are changed? Thank you, I agree. Now I just hope that the admins do implement them.
I am just saying that if the changes were made they would be OK. That said, I am happy with what I have now as relates to the suggested changes. If the changes are made I am going to have to go back and make edits, that is, unless brand new macros names are created that implement the suggestions that do not name clash with the existing macros.

AMR
Hashim

Bravo wrote:
I wonder if it would be possible to have a new section clearly labelled as 'advanced'.  Most forum users would consider that the section where they could break stuff and thus leave well alone, while those wanting more options for their forum are also catered for.

However, I have no idea how much work that would take, and to be perfectly honest what you get from MFF as a free forum provider especially on phpbb2 is by far superior than any other free forum service and I have yet to see a paid forum service that even comes close, so it should all be taken in perspective really.


That's a very good idea, and the "panel" suggested in the other thread for editing and changing the values of current macros could also be placed in here. It is really all up to the admin,

Yes, it is brilliant as it is, I agree with you, but it would do no harm, in fact it would do a lot more benefit, to take it even further, wouldn't it? After all, I'm sure the current admin's outlook is not "How it is now is brilliant enough, it doesn't need to be any more brilliant." If all great inventors and developers came to a piint with their inventions where they did that, then there would be no advancement in the world, would there? My point being, as long as there is room to improve the forum, no matter how advanced and brilliant it already is, then by all means, why not? The better it is, the happier users are and the happier everyone else is, which I presume that, as a site-owner, that is what the admin wants.

At the end of the day, these are all only suggestions, and that is all we, as users of the service, can do. One of the signs of a successful site is one where its users feel the need to make suggestions to make it better than it already is, in my opinion anyway, which is why I do make these suggestions. It is only unsuccessful and doomed sites that don't receive suggestions from their users - who can't see any reason to bother doing because they can see the site is doomed to fail anyway.

I sincerely do hope, though , that the admin does take to mind these suggestions genuinely, as I absolutely do believe they will better MFF even more.
Monsieur-Folie

Bravo wrote:
I wonder if it would be possible to have a new section clearly labelled as 'advanced'.


If this is possible it would be a perfect solution. The interface for new users is kept clutter free, but the more advanced user that wishes to delve a little deeper without too much difficulty has the option to do so. I like it.
myff admin

Okay then lets start this off gently. I have added stuff into OPTIONS, it was already saying it is there for "extra forum configuration features" and I really see no point in not carrying on developing it in that way.

I have added formats for date and time there.

I have also added an {S_LAST_VISIT_DATE} macro.

I have only added one macro because each macro we add, slows each and every forum by an infinitesimal amount, and hence whilst I am happy to add things, I'm only happy when I'm sure the macros are ones that really will be used.
Hashim

Thanks for that, Admin. Been a over a month now, when is the next one going to be added? Ideally need a similiar one to that last one except for the current time, as the current time is still stuck with the old ugly format until that macro has been added.
myff admin

Well it was on indefinite hold, now it has been asked for an so I feel it will be used it has been done.

{S_LAST_VISIT_TIME}

is being deployed as I type.
Hashim

myff admin wrote:
Well it was on indefinite hold, now it has been asked for an so I feel it will be used it has been done.

{S_LAST_VISIT_TIME}

is being deployed as I type.


Thanks for that Admin, when I was talking about time, I was actually tlaking about how the date and time is displayed on the current time, in the top right corner of forums, but it's fine, I suppose that can be the next one to be added. Once again, thanks for taking the trouble to add these, they should help people a lot.

By the way, can I ask, roughly how long will you be waiting before you add new macros? Are you going to add them in at certain intervals (every month, every wee;, etc.), or simply whenever they are requested for?

Thanks.
myff admin

I'm not that pedantic.

I'm wary on this sort of thing as many people ask for stuff and that's the last I hear, and it is probably never used.

You do seem keen, so say very clearly what macro you want (as I am not quite sure) and I will see about adding it.
Hashim

Ok, here is what I meant. Currently, we have one macro for current_time which shows time, date, and year all as one. Most of the time this isn't really necessary, and only, in my opinion at least, serves to add clutter to the page. I think having the current time is fine.

So this involves splitting the Current_Time macro into three seperate macros: Current_Time (10:50) Current_Date (9th February), Current Year (2012), so that forum-owners have the flexibility of choosing one, two, or all three if they really wanted to, instead of being forced to display the full date and time.

Taken from my original post on Page 1:

Quote:

Currently this shows the value of "The time now is 26 Dec 2011 10:56 pm". Same as with {LAST_VISIT_TIME} this should ONLY include the current time: 10:56 PM. Year and exact date of should be in a seperate macro. This is because forum-owners may not always want to show the data and date in the same place, or may only wish to show one, not both. Current date and year should be shown in a seperate macro.


Of course these don't necessarily need to be done all at once, one at a time is fine. I propose we go Current_Time, then Current_Date, then Current_ Year, if we're going to do it one macro at a time.
myff admin

hmm,
devils advocate here, but current date and time are perfectly simple javascript functions, so why not just use javascript in the template.
Hashim

You mean using JavaScript in the actual index_body.tpl? It's possible, but would it be necessary? It would mean that you'd have to clutter the entire file with a script just to display the current date and time, something which at the moment can be done with a simple macro. Also, would it not be going against consistency to use JS for just the date and time whilst macros for everything else?  

Just my opinion really, I think JS script might just over-complicate and crowd the index_body.tpl file. A macro for each seems like an easier option to me.
myff admin

A bit of extra code in a template is  much less of a big deal that a macro being set up on 25,000 forums.
Hashim

myff admin wrote:
A bit of extra code in a template is  much less of a big deal that a macro being set up on 25,000 forums.


If you're certain of that, then sure, go ahead and make it JS-code. But a question - would the JS work in the same way it would on any other site? Would you need to write the function within script tags somewhere at the top of the template (obviously it wouldn't be <head> would it, as there is no <head> accessible in the templates), and then call it where you want to use it?
myff admin

Well the point about a JS code is that we don't need to do anything. You'd simply put.

[code]
<span class="showtime"></span>
[code]

and then a bit of jquery to populate the span.

[code]
<script>
var d = new Date();
var curr_hour = d.getHours();
var curr_min = d.getMinutes();
var curr_sec = d.getSeconds();

$(".showtime").html(curr_hour + ":" + curr_min + ":" + curr_sec );
[/code]
Hashim

myff admin wrote:
Well the point about a JS code is that we don't need to do anything. You'd simply put.

[code]

[code]

and then a bit of jquery to populate the span.

[code]
<script>
var d = new Date();
var curr_hour = d.getHours();
var curr_min = d.getMinutes();
var curr_sec = d.getSeconds();

$(".showtime").html(curr_hour + ":" + curr_min + ":" + curr_sec );
[/code]


Why JQuery? Why not just use ordinary Javascript if it's as simple as getting time and date?
myff admin

Entirely up to to you, but jquery makes a lot of things easier.
Hashim

myff admin wrote:
Entirely up to to you, but jquery makes a lot of things easier.


That's what I was wondering - how would it make a simple date and time script easier and less complicated? Me personally, I don't really have any experience with JQuery, and it would be a lot easier and simpler for me to just use a plain JavaScript script to do it if there is no real difference between an ordinary JS time-and-date function and a JQuery one.
Nick(NR)

myff admin wrote:
Well the point about a JS code is that we don't need to do anything. You'd simply put.

[code]
<span class="showtime"></span>
[code]

and then a bit of jquery to populate the span.

[code]
<script>
var d = new Date();
var curr_hour = d.getHours();
var curr_min = d.getMinutes();
var curr_sec = d.getSeconds();

$(".showtime").html(curr_hour + ":" + curr_min + ":" + curr_sec );
[/code]


html disabled so you can see the span tags

span tags in index_body, the script tags in overall header, will have a proper test tomorrow unless someone beats me to it.
Hashim

Just so I know, is this way definitely being implemented then? The script way vs the macro?
myff admin

If its the the script way as it would seem to be, then we don't do anything!

As a rule if there is a viable way of someone doing something directly in a template without us altering the core code then that is what will be preferred.

It is not a matter of us not supporting people since we will provide examples of how to do stuff in the template, but of common sense, there is no point in adding load to every forum for the sake of one or two.
Hashim

myff admin wrote:
If its the the script way as it would seem to be, then we don't do anything!

As a rule if there is a viable way of someone doing something directly in a template without us altering the core code then that is what will be preferred.

It is not a matter of us not supporting people since we will provide examples of how to do stuff in the template, but of common sense, there is no point in adding load to every forum for the sake of one or two.


I get what you're saying, entirely, there's no point adding extra code if it can already be done. But my previous question was, how would it be done? Would it be in the same way as you use JS in any other webpage - using a script tags to create the function and then calling the function wherever you want to display the time?  

And also, is this already possible without any editing needed on your part then? Could I go into the code now and add a time and date script successfully?

       myfreeforum.org Forum Index -> Web page/template Editing
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum