141
hipoonios
Re: Need help from a PHP expert
  • 2010/3/14 10:53

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Sorry for taking up this topic again. But now I have 14 logos. But a week only have 7 days. And I want all logos rotating. Is it possible to modify the script to do that?



142
hipoonios
Re: Help to import database
  • 2010/3/14 10:51

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Thanks, guys. It worked for me to select just the tables and export it to a sql file.



143
hipoonios
Help to import database
  • 2010/3/7 16:31

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Here comes a noob question.

I'm moving one of my sites to a new host. But I having problems to import the database (using phpmyadmin).

The problem is: The host have already created a database. But I can't import it because there is already
a database with the same name. (see pic below).

Resized Image


I have also tried to rename the database and tried to import it again. But then i got a permission error. This because
the host only let me have 1 database:

Resized Image


So any sugesstions? Is there is a way to just import the tables from the database?



144
hipoonios
Re: Need help from a PHP expert
  • 2010/2/12 13:38

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


It works!!! Thanks again for being so helpful!



145
hipoonios
Re: Need help from a PHP expert
  • 2010/2/12 12:18

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Ok, I think I know why it happens.

The path for the cookie is modules/news2

If I change logo from a normal page (root) page then it works.

Resized Image

Now the problem is to find out how the path should always be '/' and not modules/news etc..



146
hipoonios
Re: Need help from a PHP expert
  • 2010/2/12 11:51

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


It ALMOST does every time for me. Tested in both IE8 and FF 3.6.

I clear my cookies of course before testing.

Try this:

1. Select a logo
2. Go to another module page
3. select another logo again
4. go back to the the other module page.

This way i can set a new logo for every page



147
hipoonios
Re: Need help from a PHP expert
  • 2010/2/12 11:26

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


You solved two of my problems in less than five minutes!

Now there is only one bug left. The logo change if go to another (module) page.

If you ever get an idea how to solve this let me know :)

bjuti: Nice, You should install the Winuae Amiga emulator so you can enjoy these old classic games again



148
hipoonios
Re: Need help from a PHP expert
  • 2010/2/12 10:34

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Thank You! Got it almost to work now.

It works but it's a bit buggy.

If you go to my site:

http://www.recordedamigagames.org and for example choose the monday logo. Now go to any page. Like the FAQ. Now it will change back to the logo of the day again.

Another bug. If you select "select logo" it doesn't show any logo at all. It would be great if it will show the default (logo of the day) if you pick that.

Is it possible to have other names for the choises in the dropmenu? It's seem to be not so simple. I tried to rename it like: <option value="Monday">Batman</option> But it wont load any logo.



149
hipoonios
Re: Need help from a PHP expert
  • 2010/2/11 21:24

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Thank you very much for helping me out Ghia. I really appreciate it.

Unfortunately the php code gives me a parse error. Can you please re-check the code.


edit: it would also be nice if the page will refresh after selection so the user will see the change instantly.



150
hipoonios
Need help from a PHP expert
  • 2010/2/11 17:43

  • hipoonios

  • Friend of XOOPS

  • Posts: 298

  • Since: 2005/9/24


Hello,

This a more a general PHP question than a XOOPS question. But maybe I can get help with this anyway. As I know there is some php experts hanging out here.

Well,

I currently have a logo for each day of the week.

The is the code I'm using in my theme:

<{php}>
$today=date(l);

if(
$today==Monday){
echo 
"<td background='www.mysite.com/logo1.png' border='0'>";
}

elseif(
$today==Tuesday){
echo 
"<td background='www.mysite.com/logo2.png' border='0'>";
}

elseif(
$today==Wednesday){
echo 
"<td background='www.mysite.com/logo3.png' border='0'>";
}

elseif(
$today==Thursday){
echo 
"<td background='www.mysite.com/logo4.png' border='0'>";
}

elseif(
$today==Friday){
echo 
"<td background='www.mysite.com/logo5.png border='0'>";
}

elseif(
$today==Saturday){
echo 
"<td background='www.mysite.com/logo6.png' border='0'>";
}

elseif(
$today==Sunday){
echo 
"<td background='www.mysite.com/logo7.png' border='0'>";
}
<{/
php}>


Now I want to take this one step further.

I want a normal drop-down menu there my users can select which logo they ALWAYS want. Their choise should be saved in a cookie. But if they don't select a logo, then the logo for the day should be displayed. It would also be great if there should be a default setting in drop-town to clear/delete the cookie.

Like this:

Resized Image

I would really appreciate if someone could help me with this.

Thanks.




TopTop
« 1 ... 12 13 14 (15) 16 17 18 ... 25 »



Login

Who's Online

74 user(s) are online (62 user(s) are browsing Support Forums)


Members: 0


Guests: 74


more...

Donat-O-Meter

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

Latest GitHub Commits