-
Posts
85 -
Joined
-
Last visited
Contact Methods
-
Website URL
http://www.bommachine.co.uk
Profile Information
-
Gender
Male
-
Location
London
-
Interests
Skydiving, Food, IT
ankh2054's Achievements
-
thanks for your help Raymond, sounds like a good plan
-
thanks Raymond and sorry for being so needy, I'm such a newbie. The code you provided gives me the following error. Parse Error: syntax error, unexpected T_PUBLIC (line 6 of /var/www/www.bommachine.co.uk/site/templates/hybrid.php) Line 6 public function ___actionHybridAuth() {
-
thanks Raymond, do I actually need the hybridauth module for the above? As I have now decide not to use it and implement manually.
-
from what I can see the .htaccess blocks access to the site/modules/ directory. Error I get: You don't have permission to access /site/modules/ProcessHybridAuth/hybridauth/
-
thanks Raymond, getting there now... Getting stuck with BASE_URL now. What do you add as your "base_url" => "http://site_namesite/modules/ProcessHybridAuth/hybridauth/",
-
Hi All, Wondered if anyone could provide me with some assistance with Hybridauth. I've installed the module, and just testing it with the following code. $hybridauth = new Hybrid_Auth( $ha_config ); $adapter = $hybridauth->authenticate( $provider_name ); I get the following error. I have checked the pat and it does exist. Error: Exception: Hybriauth config does not exist on the given path. (in /var/www/web_new/site/modules/ProcessHybridAuth/hybridauth/Hybrid/Auth.php thanks for any help
-
ankh2054 started following Rudimentary 5 star rating system , Autocomplete and Other Search Enhancements and How edit a page using api
-
thanks all for your help, the below worked as per instructions. foreach($matches as $m) { $out .= " <div class='media col-md-3'> <a href='{$m->url}' class='list-group-item'> <h5 class='list-group-item-heading'>{$m->title}</h4>"; foreach($m->food_types as $ft){ // Iterate through the pages here $out .= "<h5 class='list-group-item'>Type:{$ft->title} </h5>"; // Output the title here } $out .= " <p class='list-group-item-text'>{$m->body}</p> </a> </div>"; }
-
thanks very much, the first() method works successfully. This is more of a PHP question than processwire, so accept my newbiness. I am using search.php to show a list of ingredients and their associated food_types. <h5 class='list-group-item'>Type:{$m->food_types->first()->title}</h5> Need to somehow add your foreach loop into an existing for each loop to ensure it shows all the selected pages and not only the first one. Any ideas? foreach($matches as $m) { //Theme each search result $out .= "<div class='media col-md-3'> <a href='{$m->url}' class='list-group-item'> <h5 class='list-group-item-heading'>{$m->title}</h4> <h5 class='list-group-item'>Type:{$m->food_types->first()->title}</h5> <p class='list-group-item-text'>{$m->body}</p> </a> </div>"; } $out .= "</div>"; thanks for your help
-
Hi all, Struggling to get the title of a page field type. Have created a page called Almonds. The almonds page has a page field type called food_types, where one page is selected. If I load the page almonds using the below code I get the ID associated with that page field type, but I'm unsure of how to get the title. I have tried the below and get nothing, guessing I'm not doing it right. Could someone advise. thanks so much Charles
-
thanks Would you have an idea of how to load the built in tinymce?
-
Hi All, I have created a body field and set the input type as Tinymce, but it does not load when I try to create a new page and populate the body field. The module is installed and enabled. Should I be doing anything else? My code: // Process new topic creation if($input->post->create_comment) { //Sanatize variables taking in the form data $title = $sanitizer->text($input->post->title); $body = $sanitizer->textarea($input->post->body); $newPost = new Page(); // create new page object $newPost->template = wire('templates')->get('discussions-topic'); // set template $newPost->parent = $page; //Set the parent to the current page $newPost->title = $title; // set page title (not neccessary but recommended) $newPost->body = $body; //Set the body //$newPost->discussions_author = $user; //Might be able to remove this !!!!! check as I think processwire automatically remembers the username $newPost->save(); } <form class="form-horizontal" action="./" accept-charset="UTF-8" enctype="multipart/form-data" autocomplete="off" method="post"> <div class="form-group"> <label for="inputFullname3" class="col-sm-2 col-md-3 control-label">Title</label> <div class="col-md-9"> <input type="text" class="form-control" name="title" placeholder="Enter the Title" > </div> </div> <div class="form-group"> <label for="inputFullname3" class="col-sm-2 col-md-3 control-label">Body</label> <div class="col-md-9"> <textarea name='body' rows='12' cols='80' id='body' placeholder="Your message"></textarea> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button class="btn btn-primary" type="submit" name="create_comment" value="create_comment">Create Comment</button> </div> </form> thanks for any help
-
I added this to the above and it worked. $bottom_options_reply = ''; //Footer button display options - Reply $bottom_options_reply = ''; if ($reply->createdUser->name == $user->name){ $bottom_options_reply .= "<p> This is the current owner</p>"; }
-
Hi All, Wonder if someone could assist me with the below. I have created a foreach loop to show all the children pages of current page. This works. I am then trying to show different text for each child based on whether the current logged in user is the owner or not. This works, apart from at each loop iteration the previous results are added prior to the current. <?php $results = $page->children; foreach($results as $reply) { //Bottom post buttin display options - Reply if ($reply->createdUser->name == $user->name){ $bottom_options_reply .= "<p> This is the current owner</p>"; } else { $bottom_options_reply .= "<p> This is not the owner </p>"; } //Theme each topic echo " <div class='panel panel-default'> <div class='panel-body'> <div class='col-md-3'> {$avatar_profile_logo} {$reply->createdUser->name} </div> <div class='col-md-6'> {$reply->body} </div> </div> <div class='panel-footer'> {$bottom_options_reply} </div> </div> "; Below is the screenshot of the results, showing the $bottom_options_reply being added multiple times.
-
thanks teppo
-
What I ended up doing is creating pages, and within those pages creating children as topics, replies to those topics then become children of the respective topic. thanks Apeisa for your useful code, which helped me steer my own code in the right direction.
- 1 reply
-
- 1