1
mrgym
Re: Changing date display in blocks (extcal and newmembers)
  • 2004/9/26 14:04

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


Rowdie - what is your approach to formatting the dates?

Date formats differ depending on country. Just look at the short date formats;

mm/dd/yy US only
dd/mm/yy most of europe
yy/mm/dd japan (ISO 8601?)

Will you write your own date()-derived functions? Or, use setlocale() strftime() functions?

http://www.merlyn.demon.co.uk/datefmts.htm
http://www.cs.tut.fi/~jkorpela/iso8601.html




2
mrgym
Re: Changing date display in blocks (extcal and newmembers)
  • 2004/9/26 2:14

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


(great module!)

Are you looking at the date format in daily_view.php?

After a quick look, it does not seem to be changable in the template.

If you are trying to change day/month/year in daily_view.php, look on line 58;

$start_date = $start_day_name." ".$start_day." ".$start_month_name." ".$start_year." ‡ ".$start_time;

Just change the order on this line and it LOOKS like the new order will be then added to the template.




3
mrgym
international currency presentation format
  • 2004/9/26 1:51

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


(I hope this is the correct forum for this question)

I'm trying to write a module that has an admin preference for currency format. Each country has many differences in currency PRESENTATION format:

- symbol may be before or after the digits
- group separator characters differ

Examples;
en_US $1,000,000
fr_FR 1 000 000€

What approach should I take if I want to offer different currency presentation formats? ( I don't need to worry about the fractional portion of the currency for my app)

How about setlocale() and money_format()?

//'en_US','en_GB','fr_FR'are example prefs from {prefix}_config

setlocale(LC_MONETARY, 'en_US');
print("before:$x<br>");
$y = money_format("%.0n",$x);
print("after:$y<br>");

Or, should I set prefs for the symbol, symbol position, and group separator and write my own functions?

Another note. setlocale and money_format give a two-byte utf8 currency sign which does NOT display well as HTML 4. To convert to ASCII from the utf8, you may have to:

$localeArray = localconv();
$symbol = $localeArray['currency_symbol']; //what is symbol?
$symbolReplacement = utf8_decode($symbol);

//the new string with single-byte currency symbol
$y = preg_replace("/$symbol/",$symbolReplacement,$y);





4
mrgym
Re: Officer Listing for Organizations & Contact Information
  • 2004/8/23 12:29

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


This may have seemed a bit of a niche application, but I'm surprised there haven't been any suggestions. This information could be used for ANY type of club or organization.

From your constituent lodges section it looks as though there would have to be tables containing;

club information
- (club) name
- clubtype ( your note from above)
- year established
- year of membership count
- membership count
- meeting day
- would be great to refer to a calculated calendar display
- meeting location
- meeting location URL? (maps.yahoo.com)
- address ( all fields below for contact info)
- city
- province
- postal code

officers
- title
- first name
- last name
- email (probably not from XOOPS users table)

clubtype
- name of type

clubtypetitles (clubtypetitles related to clubtype)
- title (to populate title dropdown for officers)



5
mrgym
Re: Module Needed to Create a Form to Accept User Inputted Data
  • 2004/7/19 22:49

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


I think what tedsmith and I are thinking of is

INPUT FORMS
- define text, dropdown, integer, floating, fields.
- Limit the input by either 1 entry per day, or look for duplicates.
- Each form should have an enter another option. ( If I have a form asking for information about people attending an event, I should be able to enter multiple people)

REPORTS.
At the very least, display CSV output. Additional outputs could be display of each input, summaries, etc. Or, another module developer could create this capability.

Liaise does most of these things, but does not allow me to enter arrays of forms, and does not do any reports. On the positive side, Liaise is very intuitive, and I think the emblem is very creative!



6
mrgym
Re: How to Change the Title Case (spotlight)
  • 2004/7/16 17:38

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


Or, you could alter the smarty template, using the capitalize function

http://smarty.php.net/manual/en/language.modifiers.php#language.modifier.capitalize



7
mrgym
Re: Module Needed to Create a Form to Accept User Inputted Data
  • 2004/7/5 13:24

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


I thought the original title was a great module idea.

What if there was a module that allowed an admin to create forms of any type and then summarize the results? Each form could include inputs which might include text ( text box or drop down), integer, or floating point types. The summary reporting module would either list sum, average, or individual listings (a simple crystal reports).



8
mrgym
Re: Library Module
  • 2003/11/19 16:06

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


Sounds great!!! People in my volunteer organizations could certainly use this for books - could this be generalized for other items? (you don't even have the code finished and people are making requests!!!! :) )

- the distinct time for loan includes start and end dates?
- how is the user waiting list ordered? FIFO? Or, might there be other factors that give precedence to certain people?
- what contact methods are available if I loan a book, and need to contact the person who borrowed it? Are you using the users table from xoops, or your own user table?
- do you think that it might be a good idea to allow certain users to have rights to apply fines? These people would have XOOPS module administrator group rights.
- how is the project going?






9
mrgym
Re: Credits Module ?
  • 2003/11/17 16:17

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


Do you mean the $modversion[credits] in xoops_version.php? If so, this shouldn't be too difficult to do....



10
mrgym
Re: Edit Posters Name in News Stories
  • 2003/11/16 19:39

  • mrgym

  • Just popping in

  • Posts: 28

  • Since: 2002/4/26


Well, if you are SURE that using the real name isn't a privacy issue, then I can supply a quick bit of code.

I don't see an easy way to display the name rather than the uname. The newstory class is based on xoopsstory (in the class directory) which gets the uname from kernel/user.php.

If you would like to display the user's name, insert these two bits:

1. news/index.php line 78;
$story['poster'] = $sarray[$i]->getName($sarray[$i]->uid);

2. news/class/class.newsstory.php paste in this new function;
function getName($uid){
$db =& Database::getInstance();
$sql = "select name from {$db->prefix}_users where uid=$uid";
$result = $db->query($sql);
list($name) = $db->fetchRow($result);
return($name);
}

Of course, you will probably need to insert the call to getName in article.php. Look for the same substitution - uname will be replaced by getName. I will leave this for you as a XOOPS hacking adventure.




TopTop
(1) 2 3 »



Login

Who's Online

229 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits