SIERRA
Members-
Posts
100 -
Joined
-
Last visited
Everything posted by SIERRA
-
refer a PHP session that is created out side of PW inside PW
SIERRA replied to SIERRA's topic in General Support
Do I have the possibility to convert $_SESSION["user_id"] to $sesssion->userid; -
I have configured the procsswire in a sub folder like https://www.example.com/pw/. Here www.example.com is a non processwire website. In 'pw' folder I have configured processwire. In www.example.com users will be logging in and I am trying to referrer that session variable inside processwire website. If I create test page in 'pw' folder like https://www.example.com/pw/test.php and if I refer the logged in session variable this is working test.php - is as below session_start(); echo "User ID".$_SESSION["user_id"]; But if I include the above code in head.inc.php this is not working Please suggest how can I refer a PHP session that is created out side of PW inside PW My requirement is as below Some pages in ttps://www.example.com/pw/ should be available only to the logged in users. Users will be login using https://www.example.com/. So I am trying to refer that session inside PW Thanks
-
Thanks. Hope I can access the configured repeater items inside process wire in my core PHP file. I will check the references
-
Hi, If we create a 'Page' inside processwire we can use the code like '$alertspage=$pages->get(id);' to get the page id etc. But if I create a core php page inside the processwire source (without using PW template), do I have the possibility to access the processwire code like this. If yes, then could you please suggest how. Thanks
-
Thanks. This is working now ?
-
Hi, I would like to display all repeater items in a listing page and would like to navigate to the corresponding detail page page based on the selected repeater item I am passing the id of repeater_item like '?id=<?php echo $Admission_Alert->id?>' from the listing page. Then I am fetching the details as below. But this is not working. Please suggest. if (isset($_GET["id"]) and $_GET["id"]!="") $id=$_GET["id"]; $alertspage=$pages->get(id); //var_dump($alertspage) is working echo $alertspage->title //This is not working Thanks
-
Hi psy, Thanks. Got it
-
Hi, I have more than 500 repeater items. How can I search a item in admin interface. If I need to edit a item among the 500, the search will be helpful. Thanks
-
How to remove top nav and search box in custom template
SIERRA replied to SIERRA's topic in General Support
Hi, I found out the solution. The solution is: Need to disable automatic perpend and automatic append in Edit template -> Files -
Hi, I am using a custom template to configure home page. I would like to remove the 'topnav' and 'form.search input'. Please suggest how can I do this. Thanks
-
Change Process wire logo and footer text in admin panel
SIERRA replied to SIERRA's topic in General Support
I found out. This is working. Thanks -
Change Process wire logo and footer text in admin panel
SIERRA replied to SIERRA's topic in General Support
Thanks. I uploaded in templates folder. How can I give relative path -
Hi, Can we change Process wire logo and footer text in admin panel.If yes how. Could you please suggest. Thanks
-
Hai , Coding: <select name="eventstart" id="eventstart"> <option value=""><?php echo $lang['select_event_start']; ?></option> <?php foreach( $events_pages->events->find($filter.", sort=event_start") as $event) {?> <option value="<?php echo $event->event_start;?>"><?php echo $event->event_start;?></option> <?php } ?> </select> It results: But , i need result without repeated dates.how to 'groupby' event_start field in processwire ?could you please sugguest me Thank you
-
@BitPoet This is working. @BitPoet and @Zeka Thanks for your help
-
This also does not displays id
-
Thanks for your reply if we give $title="School Resumes"; $eventspage = $pages->get(1085); //eventspage $findeventspage=$eventspage->events->find("title={$title}"); echo $findeventspage; this displays id if we give $title="School Resumes"; $eventspage = $pages->get(1085); //eventspage $findeventspage=$eventspage->events->find('title={$title}'); echo $findeventspage; this does not displays id if we give $title="谢师宴 11am-1pm, Test服务奖 service award"; $eventspage = $pages->get(1085); //eventspage $findeventspage=$eventspage->events->find('title={$title}'); echo $findeventspage; this also does not displays id. Actually we need to check the duplicates if availabe. Could you please suggest. Thanks
-
Hi If we use chinese text in processwire find method like the below the error appears as 'Fatal error: Exception: Unknown Selector operator: ''' $title="谢师宴 11am-1pm, Test服务奖 service award"; $eventspage = $pages->get(1085); //eventspage $findeventspage=$eventspage->events->find("title={$title}"); Could you please suggest on this. Thanks
-
I am getting warning as below after login as admin Please suggest can I include ‘en_US.UTF-8’ against English -> /wire/modules/LanguageSupport/LanguageSupport.module as in below screen shot. But against ‘Chinese’ the same corresponding file does not exists. Thanks
-
$subscriptions=$subscriptionpage->subscriptions->find("email={email@mysite.com}"); should be $subscription=$subscriptionpage->subscriptions->find("email={email@mysite.com}"); Even then this is not working
-
Hi I am not able to delete a repeater item This code works $subscriptionpage = $pages->get(1442); $subscription = $subscriptionpage->subscriptions->first(); // or whatever item you want to remove echo $subscription; $subscriptionpage->subscriptions->remove($subscription); $subscriptionpage->of(false); $subscriptionpage->save(); But this code does not works. $subscriptionpage = $pages->get(1442); $subscriptions=$subscriptionpage->subscriptions->find("email={email@mysite.com}"); echo $subscription; $subscriptionpage->subscriptions->remove($subscription); $subscriptionpage->of(false); $subscriptionpage->save(); I checked the value of $subscriptions. Both has the same value. Could you please suggest. Thanks
-
I need to get json out put to configure calendar events. I am using fullcalendar ( https://fullcalendar.io/ ). To configure event url I am using a PHP page. If I configure a url like http://wwww.mysite.com/news-events/events/ this is not working. So I created a PHP page in root and accessing the same using http://www.mysite.com/fetch-event.php. The code is as below .......... var calendar = $('#calendar').fullCalendar({ editable: false, events: "http://mysite.com/php/fetch-event.php", displayEventTime: false, ............ While using the PHP page 'fetch-event.php' in root directory 'Text (Multilanguage)' filed is not working correctly. The PHP code is as below. $events_pages = $pages->get(1085); $events_array = array(); $events_pages = $pages->get(1085); foreach ($events_pages->events as $event) { $events_detail = array(); $event_start_tmp = strtotime($event->event_start); $event_start = date('Y-m-d',$event_start_tmp); $events_detail["id"]=$event->id; $events_detail["title"]=$event->title; //This is text - Multilanguage field $events_detail["start"]=gmdate("Y-m-d",$event->event_start); $events_detail["end"]=gmdate("Y-m-d",$event->event_start); array_push($events_array, $events_detail); } print_r($events_array); Out put is Array ( [0] => Array ( [id] => 1411 [title] => ProcessWire\LanguagesPageFieldValue Object ( [default] => School Resumes [chinese] => ) [start] => 2018-01-06 [end] => 2018-01-06 ) But I want the out as Array ( [0] => Array ( [id] => 1411 [title] => School Resumes [start] => 2018-01-06 [end] => 2018-01-06 ) Please suggest how can I do this Thanks
-
Populating drop down with repeater fields values
SIERRA replied to SIERRA's topic in General Support
I have changed the field type as option and included the needed values. So I can able to populate as below. Now this is working as expected. Thanks <?php $get_field = $fields->get('teacher_name'); $field_options = $get_field->type->getOptions($get_field); foreach($field_options as $option) { echo $option->id; } ?> -
I have a repeater field called 'class_offerings'. In this I am having the fields class_offering_title, teacher_name and term I would like to populate a drop down with non empty unique values available in teacher_name. I' m using below code. But this is displaying with duplicates. Could you please suggest on this. Thanks <?php $list_teacher=$page->class_offerings->find("teacher_name!='', sort=teacher_name"); $list_teacher_unique=$list_teacher->unique(); foreach($list_teacher_unique as $class_teachername) {?> <option value="<?php echo $class_teachername->teacher_name;?>"><?php echo $class_teachername->teacher_name->title;?></option> <?php }?>
-
Thanks. To get the text of the option field I am using below code $title_txt = $fieldtypes->get('FieldtypeOptions')->getOptions("item_category")->get('id=1')->title; I have also included Chinese version also as below. But while accessing the chinese url this is not showing chinese text. Is there any thing I need to do additionally