-
Posts
807 -
Joined
-
Last visited
-
Days Won
10
Everything posted by kixe
-
@ horst Thank you for your help, will try out later. Have still to learn more OOP and the PW's Api. @ kongondo & horst Thanks. Had a look at Horst's audio profile. Well done, looks nice. I prefer the flash-mp3-player before using Yahoos and Google players, because it is more simple in layout and can be adaptet very individual to customer pages.
-
Module is no longer maintained. Github Repo deleted! Hello community, based on the freely available flash mp3 player (http://flash-mp3-player.net) I set a module, which creates a field to store mp3-audio files in the backend and an audio player in the frontend. mp3 files can be added by drag and drop. The audio player is configurable in module settings. (Size, colors, display of buttons, volume control, etc.) About third party Code More information http://flash-mp3-player.net/players/ Code https://github.com/neolao/mp3-player License http://creativecommons.org/licenses/by-sa/3.0/deed.en Author The Initial Developer of the Original Code is neolao (neolao@gmail.com). How to install download the 2 Files: http://flash-mp3-player.net/players/maxi/download/ http://flash-mp3-player.net/medias/player_mp3_maxi.swf http://flash-mp3-player.net/players/multi/download/ http://flash-mp3-player.net/medias/player_mp3_multi.swf Download from github the module, unzip, copy module and the 2 swf Files in a folder /Audio_MP3/ and add the folder to your /site/modules/ directory. Click *check for new modules* in ProcessWire Admin Modules screen. Click *install* for the module labeled: "Audio_MP3". Now you will be on the module config screen. Please make note of the config options and set as you want. How to use Add the Audio field to your Template in Setup > Templates. Add the following code to the template file to get the title list: $modules->Audio_MP3->player['title']; to get the player: $modules->Audio_MP3->player['code']; Create a page using the Template. Drag and drop mp3 or mp3.zip files in the audio field in the Page-Edit-Area. How it works If you store just one File in the Page-Edit-Area the Maxi-Player will be loaded. For 2 or more files the Module will switch to Multi-Player. If you want an alternative title, you can put it in the Description-field of the Audio Field, which is visible after the file upload. Module Configuration - width: Forces the video width. - height: Forces the video height. //only Maxi-Player only one file stored - volume: The initial volume, between 0 and 200. By default set to 50 - showstop: 1 to show the STOP button. - showinfo: 1 to show the INFO button. - showvolume: 1 to show the VOLUME button. - showloading: 'alway','never','autohide') to show the LOADING bar// By default set to 'alway' - showinfo: 1 to show the INFO button. - buttonwidth: The buttons width. By default set to 30. - volumewidth: The width of the VOLUME button. By default set to 30. - volumeheight: The height of the VOLUME button. By default set to 10 - loadingcolor: The color of loading bar in hex format without #//default: ffff75 - sliderovercolor: Hover color of the bar in hex format without # - buttonovercolor: Hover color of buttons in hex format without # feel free to add more configuration options to the module. More information here: http://flash-mp3-player.net/players/multi/documentation/ http://flash-mp3-player.net/players/maxi/documentation/ Need some help! I would like to make the code available via $page->player['code']; but I don't know how. README.txt Audio_MP3.module
-
Dear Community, As I checked "unpublished: Not visible on site" in the settings of the "home"-page, it is still available in the frontend! I know there must be something reachable under "/". But is there any option of a "maintanance work" site? Usually I do it with .htaccess. But would be nice to have a standard redirect after unpublishing the home site. ideas welcome! kixe
-
Thanks Soma I will try out this. I implemented urlSegments to the switcher. Ryan, does it make sense and is it possible, to put this option in the function hookPageLocalUrl in the modul-file? <?echo "<ul>"; foreach($languages as $language) { if(!$page->viewable($language)) continue; // check if page not published for this language $class = "$language" == "$user->language" ? "active" : ""; $urlSeg1=($input->urlSegment1)?$input->urlSegment1.'/':''; $urlSeg2=($input->urlSegment2)?$input->urlSegment2.'/':''; $urlSeg3=($input->urlSegment3)?$input->urlSegment3.'/':''; $url = $page->localUrl($language).$urlSeg1.$urlSeg2.$urlSeg3; echo "<li class='$class'><a href='$url'>$language->title</a></li>"; } echo "</ul>"; ?> greetings from Paris kixe
-
While trying out language switcher together with the calendar. I put this to the beginning of the script: $lang = substr($page->url,1,2); $lang_code = ($lang=='en')?'en_US':$lang.'_'.strtoupper($lang);//works not for all countries but most of them (fr, de, it, nl, is, ru, es, tr) setlocale(LC_TIME, $lang_code); and changed the forward backward links: $out .= "<a href='/".$lang."/calendar/". date('Y', $lastMonth) ."/". date('m', $lastMonth) ."/'>←</a>"; $out .= "<a href='/".$lang."/calendar/". date('Y', $endTime) ."/". date('m', $endTime) ."/'>→</a>"; I am using url-segments for year and month, like ryan recommended $year = ($input->urlSegment1)?$input->urlSegment1:date('Y'); $month = ($input->urlSegment2)?$input->urlSegment2:date('m'); this will put out the current month as standard under the url en/calendar/ echo renderCalendar($page, $year, $month, $field = 'startdate'); its good to have such an easy going calendar. Thanks. Fun (while working with PW) has already started. kixe
-
A known monday is also the day after last sunday! Isn't it? $weekDayNames=array(); $i=0; while($i++ < 7) array_push($weekDayNames, strftime('%a', strtotime('last Sunday + '.$i.' day'))); change this // if we're at the beginning of a week, start a new row if($day > 1 && $dayName == $weekDayNames[0]) $out .= "<tr>"; and that // if last day in week, then close out the row if($dayName == $weekDayNames[6]) $out .= "</tr>"; kixe
-
Hi, first step is done. language switcher is working. I gave the / directory the names "en", "de" and "fr". If I am now putting out $page->name on the site, I always get "en", even if I have switched to "de". Why? What is the right api to get the names? I tried out with substr($page->url,1,2) which works. But is it really safe? Put out bool(false) in case of "/" (home directory in default language). It would be nice to have en API which put out language iso-code of the current page. Ideas? kixe
-
I am using on localhost same page with three language fields. Even tried out language page name module and (which is important here) "frontend user login". That's why I was a little bit astonished, the language didn't switch after login via frontend. I am thinking about to use PW-Users for "Comments" or small Forum. In this cases it would be nice to have the language also switched in the frontend, after setting a language to the user! I have already implemented a language switcher on the page, which is working fine. Which Api should be used to get the /en/ or /de/ from the url-path to use it in links on the template. Something like $user->language->ISO-Code ('en' for english for example) If I use $user->language->name the language name in the current language appears, like set in the backend (for example "francais", for french in french) Thanks for help. kixe
-
Hi, where can I include a language switcher, which sets, if exists, the site language automatically to the browser language? Maybe Redirection from /home/ to /home/de/ or /home/en/ I am looking for something like this: $user->language->name = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); Thanks for help kixe
-
Hello Community, after a colleague recommended PW to me I am playing around with it since two weeks. Now I can imagine the big potential PW has and I am really happy about it because it fits perfectly to what I have been searching for since a long time. Now I would like to do a small project with it to get motivation of something real visible. The project should be in three different languages. I implemented the modules and it seems to work fine. But the problem is, that the frontend is always shown in the default language. I put some different users to the platform and set different languages to them. In the backend the language switches to the users language but not in the frontend. Maybe I forgot something in the template. I don't know. Please help to save time. Thanks in advance. kixe
-
... no answer. I decided to help myself and hope somebody else will profit from it. I changed the following lines (450 ff) in the module-file from: if ($this->user->avatar) { $cropped_avatar = $this->user->avatar->first()->size(150); $avatar = $cropped_avatar->url; } to: if ($this->user->avatar->first()->url) { $cropped_avatar = $this->user->avatar->first()->size(150); $avatar = $cropped_avatar->url; } Now its working. About security: After logging-in each user can reach every profile about other users via profile/info/username. I think I will make some modifications for my personal use in this line (481): if($this->user->isLoggedin() && $this->input->urlSegment1 == 'info' && $this->sanitizer->name($this->input->urlSegment2)) { I would also recommend to include a field which inquires the old password before giving the allowence to set a new one in the edit-area. Until going deeper in PW I like it more and more and can image how big the potential for the future is. kixe
-
Hi, installed the "User-Profiles-for-PW" - Module and got an error message: Error: Call to a member function size() on a non-object (line 449 of ../../site/modules/FrontendUserProfile.module) If I give an individual Avatar to the User everything works fine. I checked the access of the no-avatar.jpg. It is ok! Couldn't find the problem quickly. btw: I would also recommend to make the module translatable. good to have a module like this. kixe
-
I installed PW again. I did step 2 and 3 after 4 and 7 and changed all the other field types to the **Langage - Type too. Its working now. no errors
-
Thats right Soma its the latest Version 2.3. What I did: 1) Admin -> Modules | enabled Languages Support and Languages Support -Fields 2) Admin -> setup -> Languages -> Add New ("german") 3) Admin -> Setup -> Languages -> Install from file http://processwire.c...5-german-de-de/ 4) Admin -> Setup -> Fields -> Body | changed the Type from Textarea to TextareaLanguage 5) Warning: Screenshot 2 (my_last_post_above) Warning ignored 6) Error: Screenshot 1 (of_my_last_post_above) occured 7) Admin -> Setup -> Fields -> Title | changed the Type from PageTitle to PageTitleLanguage 8) Warning: Screenshot 2 (my_last_post_above) Warning ignored 9) Database crashed, Error: Screenshot 3 occured I am just playing around with the system and the example page. Until now I didn't put in any data. I need the possibility of multi language editing in the backend.
-
Hello Processwire-Community, I have installed German Language Module from here: http://processwire.com/talk/topic/925-german-de-de/ While trying to enable multi-language, I got that: Error: Exception: Unknown column 'field_title.data1009' in 'field list' (in /Users/c/Sites/processwire/wire/core/Database.php line 118) Any solutions??? Christoph/ Cologne/ Germany screenshots: pcw_error_1.tiff pcw_error_3.tiff pcw_werror_2.tiff