1
Muslimin
Javascript for DAY & DATE for HTML pages
  • 2005/9/27 5:56

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


Copy and paste it to be located anywhere suitable in HTML page.

You can change the names of the days and months.

Appereance:

Tuesday, 27 SEPT 2005

========

<script language="JavaScript">
<!--
function write_date()
{
var thetime=new Date();

var nday=thetime.getDay();
var nmonth=thetime.getMonth();
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var AorP=" ";

if (nday==0)
nday="Sunday";
if (nday==1)
nday="Monday";
if (nday==2)
nday="Tuesday";
if (nday==3)
nday="Wednesday";
if (nday==4)
nday="Thursday";
if (nday==5)
nday="Friday";
if (nday==6)
nday="Saturday";

if (nmonth==0)
nmonth="JAN";
if (nmonth==1)
nmonth="FEB";
if (nmonth==2)
nmonth="MAR";
if (nmonth==3)
nmonth="APR";
if (nmonth==4)
nmonth="MAY";
if (nmonth==5)
nmonth="JUN";
if (nmonth==6)
nmonth="JULY";
if (nmonth==7)
nmonth="AUGUST";
if (nmonth==8)
nmonth="SEPT";
if (nmonth==9)
nmonth="OCT";
if (nmonth==10)
nmonth="NOV";
if (nmonth==11)
nmonth="DEC";

if (nyear<=99)
nyear= "19"+nyear;

if ((nyear>99) && (nyear<2000))
nyear+=1900;

document.write(nday+", "+ntoday+" "+nmonth+" "+nyear);

}
//-->
</script>



2
Muslimin
How do we put DATE & TIME at top left of main page
  • 2005/9/27 5:42

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


Greetings;

how do we put the date & TIME STAMP on a XOOPS generated page?


For an HTML, I know that using the Javascript works superbly.

Do you set the page format to be HTML format?


Here is the Javascript for Date for anyone to use - just copy and paste in your *.html or *.htm

I havent tried or figured how to put date/time on my XOOPS so appreciate it we can share knowhow :)

<script language="JavaScript1.2">

<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
document.write(lmonth + " ");
document.write(date + ", " + year);
// End -->
</script>



3
Muslimin
Custom Block (Auto Format)
  • 2005/9/22 14:33

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


I set Custom Block (Auto Format) when I copied and pasted my original HTML source codes (I view the page source using Mozilla).

I then submit it and refresh my index page and I got what I wanted.


BTW I haven't tried copying & pasting HTML codes for TABLES with some rows and columns.


BTW still an unanswered question, folks :)

If I want to copy and paste other webpage from its display (not copying the HTML codes which are hard) but to just run the mouse with left click - select texts and images)
does the default XOOPS editor able to do this?


I believed FCK Editor enables this, because my experience using gCards news editor was really a breeze.



4
Muslimin
Xoops tough to master, but addictive:) Some newbie method
  • 2005/9/22 14:00

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


Greetings all;

I just discovered that I can set the main XOOPS index page can be set the way I wanted it.


It is tough, mind you, since the default XOOPS editor must be set to Autoformat.


OK, so for those newbies who still wonder how do we set the main page to get rid of that blank white page?

1. Create a new Custom Block (Auto Format)

2. Set Side
Left-Center-Right ------------>choose Center


3. Choose - Visible - Yes

4. Choose - Visible - in Top page

5. Type in your title

6. Choose - Content Type - AUTOFORMAT!

7. Then you can just copy and paste whatever HTML / original file. It will format the hyperlinks texts and email links automatically.

8. IMAGE: you need to type in the <img src=" "> with absolute image URL yourself. You can use the following img tag with hyperlink:
<a href="http://where.com"><img src="domain.com/mypics">Link texts</a>

9. Note: I don't need to use <br> or <p>. Just separate the texts by one or two spacing.

10. Another easy way is to copy the source HTML codes, which is also tricky.

11. Javascripts and CGI scripts will not work!

12. Title for the page is the title you set in Preferences. I cannot make the <title> tag works :(


13. Last but not least: it accepts Unicode fonts (non English) with punctuations. Make sure you set your web browser to the correct character encoding (Mozilla). If incompatible character encoding is selected, the fonts will appear strangely, or worse, ?????????? (none appear).


Demo:
http://mauizah.muslimin.org



5
Muslimin
What is the best editor that enables copy&paste exactly a webpage
  • 2005/9/20 15:20

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


Greetings everybody;


we like XOOPS and already get the hang of it.

It also enables non English characters and fonts easily.


However the XOOPS editor is a puzzle to master.


What is difference between XOOPS editor, Smarty, FCK Editor?

Which one enables us to copy a webpage content directly and pasting it exactly with all the images and links and text formatting (bolds, colors) and spacing all exactly the same.

I can show you a demo, with my Greeting Card news system, I can just copy an interesting article from other website:
http://awaskemalangan.com/kad/getnewsitem.php?newsid=6


With Xooops, I cannot accomplish this. It turns what is copied into just plain text and we have to edit and format it ourself.

Question: can we enable the default XOOPS text editor to do this? Or do we have to install Smarty ? (I believe my greeting card news editor use Smarty).



6
Muslimin
Re: How to include a new font?
  • 2005/9/20 13:37

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


File to add/edit: /class/xoopsform/formdhtmltextarea.php


$fontarray = array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana");


I add these Arabic Unicode font familys:

$fontarray = array("A_Nefel_Adeti", "A_Nefel_Adeti_Qelew", "Trad_Arabic", "Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana");



****BTW what is DHTML?


I added the new font familys in the fontarray in xoops.php. But it did not work so I figured I have to UPLOAD the fonts to specific folder. Because these fonts are not provided by default in PCs.

Now you suggested I add the array into the formdhtmltextarea.php.

Hope that this works!




7
Muslimin
Suggestion: Wizards for Dummies :)
  • 2005/9/20 13:28

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


Suggestion: Wizards for Dummies :)

This is a suggestion from a newbie like me. Actually with HTML and Javascripts I know my way around, with Forum it is easy.


But CMS like XOOPS is really new and I am like a kid in a candy store, luckily I learned fast and avoid the mistakes mentioned.

BTW about the access permission setting, somehow it should be mentioned somehow so that newbies know about this from the start, and preventing that case where he or she only realized that guests cannot access the contents/sections/modules because the webmaster did not know he has to set the permission on!

Another thing: specify also the main page (the blank page) which is the homepage) with some words like this: Attention newbie....install new blocks and set it as the top page (index)! (Instead of staring at a blank page!)



8
Muslimin
Re: font problems (language accent)
  • 2005/9/19 11:49

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


I donno if this will work but check with my earlier question which was answered by Teibaz.


Go to langauge/your-language-folder/global.php

Add the define('char', 'arabic-windows') or the desired non English WIndows Language Settings which must follow the specified names.

//%%%%%% File Name xoopscodes.php %%%%%
define("_CHARSET","Arabic-windows");
define("_SIZE","SIZE"); // font size
define("_FONT","FONT"); // font family
define("_COLOR","COLOR"); // font color


Hope that this helps:)



My site displays articles with Arabic fonts and the accent (reading signs) which previously was horribly displayed.

Now using Windows XP the problem disappeared, so it might because of the default PC language setting and the default fonts, and also webbrowser character encoding.



9
Muslimin
How to include a new font?
  • 2005/9/19 11:37

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


Hi all!

How to include a new font/font family so that we can choose the suitable font from the drop-down menu?


I edited the xoops.php adding new fonts to the font array
which you will find enlisting Arial/Courier/....


The problem is when accessing the page which uses the new font, it is replaced by:
????????????????????

So somehow these fonts must be uploaded to what directory?

God bless y'all.



10
Muslimin
Problem settled!
  • 2005/9/19 11:10

  • Muslimin

  • Just popping in

  • Posts: 11

  • Since: 2005/9/19


Thank you TEIBAZ!


BTW I am using another computer which is Windows XP and the problem is resolved. What about Linux? I never used Linux PC but don't they come complete with international fonts?


Previous computer is Windows ME.


I think by default Windows XP have suitable fonts which BEST DISPLAY non-ROman Unicode characters without the separation problem.


OK so for those who have problem with Arabic or non-Roman characters:

-You don't have to change anything in the language/global.php
-You don't have to include your desired fonts/font family in your style.css
-*Note: only for Arabic, donno what happened or how to deal with Chinese, Japanese, etc though:0
-*I have very little proficiency in Arabic though, the purpose of all this is to display Quranic texts with the reading signs

Just use the command
text - some computers will see it correctly, some don't.

Demo: I pasted here the Arabic text with font command [ font=?] specified

وَلاَ تَتَّبِعُواْ خُطُوَاتِ الشَّيْطَانِ إِنَّهُُ' لَكُمْ عَدُوّ ٌ مّـُبِينَ



Salam and cheers!




TopTop
(1) 2 »



Login

Who's Online

227 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 227


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