#### Category : octobercms

Recently I’ve just started testing October CMS. As for starting point I’ve installed this theme Really, I don’t know does a issue relates to this theme, but the problem is with a filterable blog categories. I’ve created two blog categories: "Photos" and "Videos", I’ve created several posts and assigned them accordingly. Featured images of two ..

I’m start in developing a simple e-learning platform. I’ve to create a frontend where users can buy courses (so implement simple E-Commerce for doing that), an admin aera where users can observe percentual of the course and also can modified some information (username, personal info, avatar). Users need registration for buy a course. I’ve also ..

I added the following configurations at config/app.php file: ‘STATUS’ => [ ‘PENDING’ => [‘LABEL’=>’Pending’, ‘VALUE’=>0], ‘PACKAGING’ => [‘LABEL’=>’Packing Done’, ‘VALUE’=>1], ‘PICKUP’ => [‘LABEL’=>’Assign to Pickup’, ‘VALUE’=>2], ‘REPICKUP’ => [‘LABEL’=>’Reassign to Pickup’, ‘VALUE’=>3], ‘PICKUPDONE’ => [‘LABEL’=>’Pickup Done’, ‘VALUE’=>4], ‘ASSIGNTODELEVER’ => [‘LABEL’=>’Assign to Deliver’, ‘VALUE’=> 5], ‘REASSIGNTODELEVER’ => [‘LABEL’=>’Reassign to Deliver’, ‘VALUE’=> 6], ‘DELIVERED’ => [‘LABEL’=>’Delivered’, ‘VALUE’=> ..

I am building a function to collect likes data from facebook fanpage, instagram etc … I’ve spent quite a bit of time learning the facebook graph api, but it doesn’t seem possible. Hope there is a more viable solution for my php project. Sourc..

I use october CMS and trying to extend some futures on one of the modules. I have settings column in my DB, that have several fields. But when user type something in this fields goes to DB like JSON : {"about":"dsadasdas","nickname":"bojko"} or {"nickname":"qnica","about":"test"} When i try to dispalay this in profile page {{ueuser.user.settings}} first gives ..

I have to set some constant values to use anywhere of the application. How can I set this constant. I am trying as follows: I set the STATUS constant at layouts/admin.htm function onStart() { if(!Auth::getUser()){ Flash::error($this[‘theme_lang’][‘not_allowed’]); return Redirect::intended(‘login’); }$this[‘STATUS’] = [ ‘PENDING’ => 0, ‘PACKAGING’ => 1, ‘PICKUP’ => 2, ‘REPICKUP’ => 3, ‘PICKUPDONE’ ..

E.g I need to add to my relation strings Like this format: Name Sername (the post) and the post I need to take from another table (at this relation i have only post_id). How can I take post.title using fields.yaml file? professors: label: Преподаватель descriptionFrom: description span: auto required: 1 type: relation select: concat(name, ‘ ..

I have installed OCtoberCMS, and use User Extended plugin to make a profile page. When i try to use component to show Friends reques, the page throws me an error Call to a member function take() on array Here is the function: public static function listReceivedFriendRequests($limit = 5) {$users = new Collection(); $limit = .. Read more Model definition: class DeliveryCharge extends Model { /** * @var string The database table used by the model. */ public$table = ‘delivery_charges’; /** * @var array Validation rules */ public $rules = [ ]; protected$casts = [ "locations" => "json", "time_charges" => "json", ]; public $belongsTo = [ ‘districts’ => [ ‘RainLabLocationModelsDistrict’, ‘otherKey’ .. Read more I’m trying to sort table using AJAX ScheduleC.php public function onSort() {$groupId = (int)post(‘groupid’); $professorId = (int)post(‘professorid’);$schedules = Schedule::orderBy(‘date’, ‘desc’)->get(); if (($groupId) && ($groupId!=’-1′)) { $this->sortByGroup($groupId, $schedules); } if (($professorId) && ($professorId!=’-1′)) {$this->sortByProfessor($professorId,$schedules); } $this->schedule =$this->page[‘schedule’] = $schedules; return$this->page[‘schedule’]; } default.php <div id="schedule-table-container"> {% partial ‘@schedule-table’ %} </div> schedule.js ..

I’ve installed the rainlab forum (https://octobercms.com/plugin/rainlab-forum) and I’d like to see page titles by title, individual posts, and channel. I mean in the header .. I tried the option… function onEnd() { $this->page->title = "$forumChannel"; } but it doesn’t work for me 🙁 Can anyone help me please? Big thank you. Sourc..

I am trying to sort lessons by group name (in component). I take group_id by Post method using Ajax and trying to get similar lessons, but the returned array is empty. Schedule.php: public $belongsTo = [ ‘discipline’ => ‘TitamikCioModelsDiscipline’, ‘auditorium’ => ‘TitamikCioModelsAuditorium’, ‘professors’ => ‘TitamikCioModelsProfessor’, ‘groups’ => ‘TitamikCioModelsGroup’, ]; Group.php: public$hasMany = [ ‘direction’ ..

I have the following partial file structure: dashboard –forrced_popup_form –client_type.htm –forced_popup_modal.htm Now I am calling partial from admin.htm layout as follows: {% partial ‘dashboard/forced_popup_modal’ popupFor = ‘client_type’ %} And I want to include client_type.htm partial from forced_popup_modal.htm as follows: {% partial ‘dashboard/forced_popup_form/’+{{client_type}} %} I am getting an error. May be I am trying to pass ..

I’m trying to upload image-file from frontend in OctoberCMS I have a model Person and relation: public $attachOne = [ ‘photo’ => ‘SystemModelsFile’ ]; In php-block with upload form: public function onUploadImage() {$person = Person::where(‘id’, ‘=’, $this->param(‘id’))->first();$person->photo = Input::file(‘avatar’); $person->save(); } And my template: <form method="POST" action="/persons/person/{{person.id}}" accept-charset="UTF-8" enctype="multipart/form-data"> <input type="hidden" name="_handler" value="onUploadImage"> .. Read more$doc->user_id = Auth::getUser()->id;; $doc->type = post(‘type’);$doc->list_num = post(‘list_num’); $doc->ticket = post(‘ticket’);$doc->contract = post(‘contract’); $doc_id =$doc->save(); I want to take last added modele id from database. How I can do this? Sourc..

I use OctoberCms (laravel). This uses own Filesystem https://octobercms.info/docs/services-filesystem-cdn/ That is why I need to take generated $pdf as a string, and than use Storage::put(‘docs/kek.pdf’,$pdf); public function onGeneratePdf() { $pdf = new FPDF();$pdf->AddPage(); $pdf->SetFont(‘Arial’,’B’,16);$pdf->Cell(40,10,’Hello World!’); $pdf->Output(”,’S’); // I also use$pdf->Output(‘S’); Storage::put(‘docs/kek.pdf’, $pdf); return$pdf; } But it isn’t works, because Output() ..

I have an OctoberCMS installation locally and when I try to login the login page just reloads with no error message. I have reset my admin password using the CLI so I know I have the correct credentials. With no error I cannot see where to go next to try to fix the problem Has ..

I have the following raw sql which is perfectly working: $data = Request::all(); extract($data); $coverageAreaInMile = 2 ;$nearByShop = DB::select( "SELECT shop.id as shopId, shop_category.id as catId, favourites.user_id, favourites.status, (3956 * 2 * ASIN(SQRT( POWER(SIN(( $lat – lat) * pi()/180 / 2), 2) +COS($lat * pi()/180) * COS(lat * pi()/180) * POWER(SIN(( \$lng ..

I already installed my own plugin then add my schema in graphql/schema.graphql with vendor:publish command. This is my configuration register settings in plugin.php public function register() { App::register(‘NuwaveLighthouseLighthouseServiceProvider’); App::register(‘MLLGraphQLPlaygroundGraphQLPlaygroundServiceProvider’); } but in /graphql-playground always return Server cannot be reached and JSON.parse: unexpected character line at line 1 column 1. anyone can solve my problem ? ..

The solution to this is probably easy and I’m just missing it, but I can’t seem to figure out how to limit "customers" based on the "user" that the customer belongs to. This is a many to many relationship, so a customer can belong to more than one user and a user can have more ..

I would like to send an email in addition to any email that will be kept logged in the system I would be happy to help Sourc..

since a composer update I got this error when I run php artisan route:list : [SymfonyComponentDebugExceptionFatalThrowableError] Class name must be a valid object or a string I ran some tests and this is the lines where the error should but i don’t see why: use BusinessbecauseUsersControllersUsers; Route::get(‘/users/update/created_at’, Users::class .’@update_users_created_at’); Do you have any idea why ..