Welcome to Fogfighters Hungary!
 
  Login or Register
.week  
Time
 
 
 
Languages
Select Interface Language:

 
Google Translation
Translation
 
Traffic Report
 
Where are you from?
 
Map Random
Objective
Oilraid
View Oilraid
Control over the city of Al Dawda means control over the oil in the region. The Axis are defending the city against the Allied raiders.
Hits: 5
Total Maps: 85
 
Modules
· Home
· About Easter
· Büntetés kalkulátor
· Bible
· Biorythm
· Birds
· Black Gallery
· Cats
· Coppermine
· Dogs
· eCards
· ET Game manual
· ET Handbuch
· ET játékleírás
· ET Maps
· Fórumok
· FIFA World Cup 2006
· Fish
· Google Guide
· Googlemaps
· Hírküldés
· Help Desk
· Internet_TV
· Keresés
· Letöltések
· Members List
· Member_Map
· News
· Online Radios
· PHP-Nuke_HOWTO
· PHP-Nuke_Tools
· Private Messages
· Punkbuster
· Saját beállításaid
· Shout Box
· Statisztikák
· Szavazások
· Szerencsejáték
· Tagfelvétel
· Viccek
· Videó kollekció
· Web címek
· Web Development
 
MS-Analysis
Top-Ten Countries visiting Fogfighters Hungary

1 United States United States
2 China China
3 Viet nam Viet nam
4 Russian Federation Russian Federation
5 France France
6 Hungary Hungary
7 unknown unknown
8 Ukraine Ukraine
9 Canada Canada
10 United Kingdom United Kingdom
11 Germany Germany
12 Netherlands Netherlands
13 Poland Poland
14 Italy Italy
15 Taiwan, Province of China Taiwan, Province of China
16 Seychelles Seychelles
17 Australia Australia
18 Romania Romania
19 Indonesia Indonesia
20 India India
21 Thailand Thailand
22 Sweden Sweden
23 Brazil Brazil
24 Japan Japan
25 South Africa South Africa
26 Lithuania Lithuania
27 Argentina Argentina
28 Spain Spain
29 Iran, Islamic Republic of Iran, Islamic Republic of
30 Chile Chile
31 Luxembourg Luxembourg
32 Turkey Turkey
33 Moldova, Republic of Moldova, Republic of
34 Korea, Republic of Korea, Republic of
35 Belarus Belarus
36 Malaysia Malaysia
37 Venezuela Venezuela
38 Switzerland Switzerland
39 Singapore Singapore
40 Colombia Colombia
41 Hong Kong Hong Kong
42 Mexico Mexico
43 Mongolia Mongolia
44 Czech Republic Czech Republic
45 Belize Belize
46 Greece Greece
47 Honduras Honduras
48 Estonia Estonia
49 Latvia Latvia
50 Bulgaria Bulgaria

View MS-Analysis
 
Scrolling Links
Mods:































Community:




































Clans:






























































League:










Anticheat:












Other:

































 
Special days




July


 
Képes Naptár
There is a problem right now with this block.
 
CPG Random Picture

Kilátás az ablakból

 
Latest Videos


Last added videos

Orvosnál

Orvosnál

Last added videos

Funny

Funny Mortar

Last added videos

Shy

Shy Rose - I Cry For You
 
How to enter thousands of ephemerids

27.8. How to enter thousands of ephemerids

Figure 27-7. Administration panel: Ephemerids.

Administration panel: Ephemerids.



Problem: You have a file of nice quotes (often called "fortunes") that you would like to see displayed every day in the Ephemerids module (see Section 6.1 for the user view and Section 7.1 for the administrator view of the Ephemerids module) . You don't want to write all those texts by hand, so you are looking for a way to automate the text insertion.

Idea:The right command to insert a text in the Ephemerids table nuke_ephem is:

insert into nuke_ephem values (4,4,11,2002,
"Nothing cures insomnia like the realization that it's time to get up.",");

We will use a script to produce these INSERT commands (see Inserting Ephemerids through script).

Solution: We write a script like:

#! /bin/sh
did=6
while [ $did -le 30 ]; do
  read LINE
  if [ -n "$LINE" ]; then
    echo "insert into nuke_ephem values (",$did,11,2002,\"$LINE\",");"
    did=$((did+1))
  fi
done

Let's call it "ephemerids" - don't forget to make it executable. When executed, the ephemerids script outputs the MySQL INSERT command we saw above, for each fortune in the standard input. Suppose that the "fortunes" are in the file called "myfortune", one fortune per line. Then, if you use the script as follows:

ephemerids < myfortune > ephemerids.sql

it will create the necessary MySQL statements and put them all in the ephemerids.sql file. Once ephemerids.sql is created, you only need to import it in the PHP-Nuke database. For this, you can type

mysql -u dbuname -h dbhost -p dbname < ephemerids.sql

or use the import function of phpMyAdmin (Section 3.3).

Verification: To show the content of nuke_ephem and verify that the fortunes were inserted, execute the following SQL query:

select eid,did,mid,yid from nuke_ephem;

Note that in this version, the above problem can be easily solved with the Random Quotes block (see Section 8.2.8). However, instead of fortunes, you could just as well have the birthdays of hundreds of people, or the dates and descriptions of thousands of historical events, as in a classic ephemerids context.

Send all questions and comments to:
Webmaster
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest Fogfighters Hungary © 2007 - 2022

You can syndicate our news using the file backend.php or ultramode.txt

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.33 Seconds

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::