31
slyss
Re: Drop down menu with unserlize function ?
  • 2008/3/10 16:27

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


now is ok...

i have change:

if (substr($token,0,1) == """)


with:

if (substr($token,0,1) == '"')


thanks a lot for your time...

you are a great developer...

thanks a lot...
[size=x-large]2008 Xoops Book[/size]



32
slyss
Re: Drop down menu with unserlize function ?
  • 2008/3/10 16:07

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


it dosn't work

what kind of beer i can ship to you ?
[size=x-large]2008 Xoops Book[/size]



33
slyss
Re: Drop down menu with unserlize function ?
  • 2008/3/10 15:18

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


is nearly right!!!!

i need for eg.:

$country_id = 'new_york_area';
$country_name = 'New York Area';

....

$country_id = 'other_place_usa';
$country_name = 'Other place in USA';

so, not id but string name ... is possible?

thanks a lot for your time
[size=x-large]2008 Xoops Book[/size]



34
slyss
Re: Drop down menu with unserlize function ?
  • 2008/3/10 13:48

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


thanks a lot but i think you haven't understand my problem:

in my first post you can see my serialized variable $coutries.

This is the problem: i can't do a query on database, but i need to load data from my variabile $coutries...
[size=x-large]2008 Xoops Book[/size]



35
slyss
Re: Drop down menu with unserlize function ?
  • 2008/3/10 10:58

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


thanks a lot for your fast reply but i don't understand how you can assign

$countries[name] ?
[size=x-large]2008 Xoops Book[/size]



36
slyss
Re: Drop down menu with unserlize function ?
  • 2008/3/10 10:01

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


thanks for your reply Marco but i need to do this without smarty...
[size=x-large]2008 Xoops Book[/size]



37
slyss
Re: Drop down menu with unserlize function ?
  • 2008/3/10 7:45

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


up, thanks.
[size=x-large]2008 Xoops Book[/size]



38
slyss
Drop down menu with unserlize function ?
  • 2008/3/9 18:28

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Hi all

i need to create a drop down menu with this variable:

$coutries:

a:101:{s:13:"new_york_area";s:18:"002) New York Area";s:15:"other_place_usa";s:23:"003) Other place in USA";s:5:"italy";s:10:"004) Italy";s:11:"afghanistan";s:16:"006) Afghanistan";s:7:"albania";s:12:"007) Albania";s:7:"algeria";s:12:"008) Algeria";s:9:"argentina";s:14:"009) Argentina";s:9:"australia";s:14:"010) Australia";s:7:"austria";s:12:"011) Austria";s:15:"select_location";s:22:"001) Select a Location";s:7:"nothing";s:15:"005) ----------";s:7:"bahamas";s:12:"012) Bahamas";s:10:"bangladesh";s:15:"013) Bangladesh";s:7:"belgium";s:12:"014) Belgium";s:7:"bolivia";s:12:"015) Bolivia";s:18:"bosnia_herzegowina";s:27:"016) Bosnia and Herzegowina";s:6:"brazil";s:11:"017) Brazil";s:8:"bulgaria";s:13:"018) Bulgaria";s:6:"canada";s:11:"019) Canada";s:10:"cape_verde";s:15:"020) Cape Verde";s:5:"chile";s:10:"021) Chile";s:5:"china";s:10:"022) China";s:8:"colombia";s:13:"023) Colombia";s:5:"congo";s:10:"024) Congo";s:10:"costa_rica";s:15:"025) Costa Rica";s:7:"croatia";s:12:"026) Croatia";s:4:"cuba";s:9:"027) Cuba";s:14:"czech_republic";s:19:"028) Czech Republic";s:18:"dominican_republic";s:23:"029) Dominican Republic";s:5:"egypt";s:10:"030) Egypt";s:7:"estonia";s:12:"031) Estonia";s:4:"fiji";s:9:"032) Fiji";s:7:"finland";s:12:"033) Finland";s:6:"france";s:11:"034) France";s:7:"georgia";s:12:"035) Georgia";s:7:"germany";s:12:"036) Germany";s:5:"ghana";s:10:"037) Ghana";s:6:"greece";s:11:"038) Greece";s:9:"greenland";s:14:"039) Greenland";s:9:"guatemala";s:14:"040) Guatemala";s:6:"guinea";s:11:"041) Guinea";s:5:"haiti";s:10:"042) Haiti";s:9:"hong_kong";s:14:"043) Hong Kong";s:7:"hungary";s:12:"044) Hungary";s:7:"iceland";s:12:"045) Iceland";s:5:"india";s:10:"046) India";s:9:"indonesia";s:14:"047) Indonesia";s:4:"iran";s:9:"048) Iran";s:4:"iraq";s:9:"049) Iraq";s:7:"ireland";s:12:"050) Ireland";s:6:"israel";s:11:"051) Israel";s:7:"jamaica";s:12:"052) Jamaica";s:5:"japan";s:10:"053) Japan";s:6:"jordan";s:11:"054) Jordan";s:5:"kenya";s:10:"055) Kenya";s:5:"korea";s:10:"056) Korea";s:6:"kuwait";s:11:"057) Kuwait";s:9:"lithuania";s:14:"058) Lithuania";s:10:"madagascar";s:15:"059) Madagascar";s:8:"malaysia";s:13:"060) Malaysia";s:8:"maldives";s:13:"061) Maldives";s:5:"malta";s:10:"062) Malta";s:9:"mauritius";s:14:"063) Mauritius";s:6:"mexico";s:11:"064) Mexico";s:6:"monaco";s:11:"065) Monaco";s:10:"mozambique";s:15:"066) Mozambique";s:5:"nepal";s:10:"067) Nepal";s:11:"netherlands";s:16:"068) Netherlands";s:11:"new_zealand";s:16:"069) New Zealand";s:7:"nigeria";s:12:"070) Nigeria";s:8:"pakistan";s:13:"071) Pakistan";s:6:"panama";s:11:"072) Panama";s:8:"paraguay";s:13:"073) Paraguay";s:4:"peru";s:9:"074) Peru";s:6:"poland";s:11:"075) Poland";s:8:"portugal";s:13:"076) Portugal";s:7:"romania";s:12:"077) Romania";s:18:"russian_federation";s:23:"078) Russian Federation";s:12:"saudi_arabia";s:17:"079) Saudi Arabia";s:9:"singapore";s:14:"080) Singapore";s:8:"slovakia";s:13:"081) Slovakia";s:8:"slovenia";s:13:"082) Slovenia";s:7:"somalia";s:12:"083) Somalia";s:12:"south_africa";s:17:"084) South Africa";s:5:"spain";s:10:"085) Spain";s:6:"sweden";s:11:"086) Sweden";s:11:"switzerland";s:16:"087) Switzerland";s:6:"taiwan";s:11:"088) Taiwan";s:8:"thailand";s:13:"089) Thailand";s:7:"tunisia";s:12:"090) Tunisia";s:6:"turkey";s:11:"091) Turkey";s:7:"ukraine";s:12:"092) Ukraine";s:19:"united_arabemirates";s:24:"093) United ArabEmirates";s:14:"united_kingdom";s:19:"094) United Kingdom";s:7:"uruguay";s:12:"095) Uruguay";s:9:"venezuela";s:14:"096) Venezuela";s:14:"virgin_islands";s:19:"097) Virgin Islands";s:10:"yugoslavia";s:15:"098) Yugoslavia";s:5:"zaire";s:10:"099) Zaire";s:6:"zambia";s:11:"100) Zambia";s:8:"zimbabwe";s:13:"101) Zimbabwe";}


I need to create a drop down menu without using XoopsThemeForm, XoopsFormSelect, addElement, etc.

I need to create it with PHP (without Xoops's functions).

I need to have this for eg:

....
php code for unserialize variable $coutries ?
....

echo
'
<select name="countries">
<option value="">Select countries...</option>
'
;

foreach (... or for ...) {

echo
'<option value="$data[0]">$data[1]</option>'

}

echo
'</select>';


where $data[0] and $data[1] are 2 variabile from my variable $coutries serialized.

It's possible? Can you help me?

thanks a lot for your time

Stefano
[size=x-large]2008 Xoops Book[/size]



39
slyss
Re: Revolution of Xoops Banners System
  • 2008/3/9 18:17

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

pacho wrote:
Thanks slyss.


you are welcome
[size=x-large]2008 Xoops Book[/size]



40
slyss
Re: Revolution of Xoops Banners System
  • 2008/3/4 7:41

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

pacho wrote:
Very interesting functions. I have a mess inside my mind... what about a BBC code like [banner] that we can put inside a text in any module? Maybe with parameters like id_banner or id_client.
Your functions are ready and working, seems just a one more step.


is a good idea...

for the moment you can try this:

<{php}> your php codes here <{/php}>


if your editor support Smarty Tags..
[size=x-large]2008 Xoops Book[/size]




TopTop
« 1 2 3 (4) 5 6 7 ... 22 »



Login

Who's Online

204 user(s) are online (124 user(s) are browsing Support Forums)


Members: 0


Guests: 204


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