Jump to content
  • Who's Online   0 Members, 0 Anonymous, 36 Guests (See full list)

    There are no registered users currently online

All Activity

This stream auto-updates     

  1. Past hour
  2. I saw nothing in the documentation to explain this, and I'm confident that this is both concrete5's fault and something that they should fix. For you, a) Create a CSS file for overriding this kind of stuff, define a new font-family like "Glyphicons Halflings 2" with correct srcs, and override .ccm-ui .glyphicon and whatever else to use the corrected font-family b) Fix the concrete5 files directly
  3. Yes, I too found them in app.css who's first half seems to be a modified version of Bootstrap v3.4.0. Modified being the addition of the .ccm-ui namespace and also some margins, colors, etc are slightly changed (maybe LESS or Sass related?). Both versions have the ../ before fonts so it looks for them at /concrete/css/../fonts/* instead of where they are located at /concrete/css/fonts/*. So, the cause of the error is identified which is great, but without just editing the file, not the cure. I expect there is some "concrete5" thing I need to do when creating a package (concrete5 speak for add-on) which surely is out of scope here. Thanks for getting me half way there. <link href="/concrete/css/app.css?ccm_nocache=ca17add95b11d1baf3d74fcd3fa4637fb02c14ba" rel="stylesheet" type="text/css" media="all"> @font-face { font-family:"Glyphicons Halflings";src:url("../fonts/glyphicons-halflings-regular.eot");src:url("../fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"),url("../fonts/glyphicons-halflings-regular.woff2") format("woff2"),url("../fonts/glyphicons-halflings-regular.woff") format("woff"),url("../fonts/glyphicons-halflings-regular.ttf") format("truetype"),url("../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); } .ccm-ui .glyphicon { position: relative; top: 1px; display: inline-block; font-family: "Glyphicons Halflings"; font-style: normal; font-weight: 400; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  4. Today
  5. Having already deleted the download, I remember seeing them in app.css. If you want to be more precise, search for "glyphicons-halflings-regular". Basically any instance of that will be wrong.
  6. Simple search results in 32,774 matches! That being said, won't need to look at each and should be able to track down. Could you elaborate on concrete5 screwing up the path and filenames?
  7. The line numbers are irrelevant. The problem is whatever CSS is referencing those fonts, and a simple search for "glyphicons" should find it quickly. Spoiler: concrete5 screwed up the path and filenames.
  8. I am creating an add on to a 3rd party CMS called Concrete5. Normally, when I have client issues, I can trace them to the server and fix them, however, this not doing so well on these issues. The following errors are being displayed in Chrome console: Checking the server’s folder directory, it is true there is no concrete/fonts directory but there is a concrete/css/fonts directory with a couple of the missing files (but not glyphiconshalflings-regular.woff2). Back to the errors, clicking the line number (i.e. 927, 3115, and 1), chrome blames apparently innocent line numbers. What steps would you recommend taking to identify the cause and fix these errors?
  9. Given that xml extract $required = ['Feasibility', 'Measure Up', 'Model Drawing', 'Concept Design', 'Developed Design', 'Resource Consent', 'Construction Documentation' ]; $str = <<<XML <Jobs> <Job> <ID></ID> <Name>Job 1</Name> <State>Concept Design</State> <StartDate>2019-02-01</StartDate> <DueDate>2019-10-01</DueDate> <Tasks> <Task> <ID></ID> <Name>Measure Up</Name> <StartDate>2019-07-01</StartDate> <DueDate>2019-07-30</DueDate> </Task> <Task> <ID></ID> <Name>Concept Design</Name> <StartDate>2019-08-01</StartDate> <DueDate>2019-08-31</DueDate> </Task> </Tasks> </Job> </Jobs> XML; $xml = simplexml_load_string($str); // echo '<pre>', print_r($xml, 1), '</pre>'; foreach ($xml->Job as $job) { $state = (string)$job->State; if (!in_array($state, $required)) continue; echo "{$job->Name} — $state — "; foreach ($job->Tasks->Task as $task) { if ($task->Name == $state) { echo $task->DueDate . '<br>'; } } } Output Job 1 — Concept Design — 2019-08-31 EDIT - Alternative method $xml = simplexml_load_string($str); foreach ($xml->xpath("//Job") as $job) { $state = (string)$job->State; if (!in_array($state, $required)) continue; echo "{$job->Name} &mdash; $state &mdash; "; $task = $job->xpath("//Task[Name='$state']") ; echo $task[0]->DueDate . '<br>'; }
  10. Thank you kicken, While I think you are mostly correct, not sure if you are completely correct, but you definitely solved me problem! For whatever reason, I just do not enjoy configuring web servers which makes me not very good at it which causes me mysterious issues such as this. Instead, I too often copy and paste and assume things are correct. For https, I use letsencrypt, and just execute sudo certbot --apache which automatically updates the http config file and creates the https config file. After reading your post, I first confirmed that other sites which I do such for are correctly redirecting, and then I compared the conf files to this problem site. For unknown reasons, this just happened to leave out the RewriteEngine on line, and after adding it, it works as expected. Agree your solution is simpler and I believe it is the same as I previously was using before using letsencrypt. Thanks again! <VirtualHost *:80> ... <Directory "/var/www/concrete5/public"> ... </Directory> RewriteEngine on RewriteCond %{SERVER_NAME} =test.example.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>
  11. Any chance of the full XML? That doesn't seem to match up with your processing.
  12. Hi again, sorry to be a pain but further to the previous question, I have the added requirement to be able to show the due date of a particular task but only if that task-name is the same as the current job state. The xml code looks something like this <Job> <ID></ID> <Name>Job 1</Name> <State>Concept Design</State> <StartDate>2019-02-01</StartDate> <DueDate>2019-10-01</DueDate> <Tasks> <Task> <ID></ID> <Name>Measure Up</Name> <StartDate>2019-07-01</StartDate> <DueDate>2019-07-30</DueDate> </Task> <Task> <ID></ID> <Name>Concept Design</Name> <StartDate>2019-08-01</StartDate> <DueDate>2019-08-31</DueDate> </Task> ....etc my somewhat lame attempt looks like this $projects = array(); $required = ['Feasibility', 'Measure Up', 'Model Drawing', 'Concept Design', 'Developed Design', 'Resource Consent', 'Construction Documentation' ]; $xml=simplexml_load_string($response) or die("Error: Cannot create object"); foreach($xml->Jobs->Job as $item) { if (in_array((string)$item->State, $required) ) { $projects[] = array( 'job_no' => (string)$item->ID, 'job_name' => (string)$item->Name, 'job_due' => date('d/m/Y', strtotime($item->Tasks->Task->DueDate)), 'job_status' => (string)$item->State, 'task_name' => (string)$item->Tasks->Task->Name, 'job_staff' => (string)$item->Assigned->Staff->Name, ); } } usort($projects, function($a,$b) {return $b['job_due'] <=> $a['job_due']; } ); foreach ($projects as $proj) { $job_no =$proj['job_no']; $job_name =$proj['job_name']; $job_status =$proj['job_status']; $job_staff =$proj['job_staff']; if (in_array((string)$item->Tasks->Task->Name, $job_status)){ $job_due =$proj['task_due']; } $task_name =$proj['task_name']; Thanks again for your help.
  13. Yesterday
  14. Your RewriteCond is unnecessary. %{SERVER_NAME} resolves to whatever the ServerName directive is, so that condition is always true. %{HTTP_HOST} would be the name the request uses. Unless this is your default vhost that should also always be equal to test.example.com though as you have no ServerAliases.. If you just want every non-https request to go to https, there is a simpler way: <VirtualHost *:80> ServerName test.example.com Redirect permanent / https://test.example.com </VirtualHost> This is what I use for pretty much all my sites.
  15. Hoping to get another set of eyes. Why isn't this redirecting? I put http://test.example.com in the browser, and it sometimes redirects and sometimes doesn't. I've removed any .htaccess files just to be sure. Thanks <VirtualHost *:80> ServerName test.example.com DocumentRoot /var/www/concrete5/public <Directory "/var/www/concrete5/public"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all RewriteEngine On </Directory> RewriteCond %{SERVER_NAME} =test.example.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <IfModule mod_ssl.c> <VirtualHost *:443> ServerName test.example.com DocumentRoot /var/www/concrete5/public <Directory "/var/www/concrete5/public"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all RewriteEngine On </Directory> Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/test.example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/test.example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/test.example.com/chain.pem </VirtualHost> </IfModule>
  16. So based on what you said, here's the full query. $find_likes = $db->prepare("SELECT COUNT(*) as likes FROM products p JOIN product_likes pl USING (product_id) WHERE p.user_id = :user_id"); $find_likes->bindParam(':user_id', $my_user_id); $find_likes->execute(); $get_likes = $find_likes->fetchColumn(); echo $get_likes; Seems to work fine now. Thanks.
  17. Don't use form method = GET if you don't want the values to be in the query string.
  18. so it means this is secure check what is happen when i'm trying searching http://localhost/member_app/results?page=1&search=mahenda i'm doubt with the number of page why is visible and how to hide them
  19. That has already been answered in the previous post... The query string has been automatically url_encoded prior to submission.
  20. $keyword = $_GET['search']; $search = $con->prepare("SELECT * FROM members WHERE name LIKE :keywword"); $search->bindValue(':keyword', '%' . $keyword . '%', PDO::PARAM_STR); $search->execute(); or $keyword = mysqli_real_escape_string($con, $_GET['search']); ........ which is better for securing search input and why uri is http://localhost/member_app/results?search=<script>alert('hi')<%2Fscript> after submission
  21. A single query will do the job without any looping. SELECT COUNT(*) as likes FROM products p JOIN product_likes pl USING (product_id) WHERE p.user_id = ?
  22. It's late and I'm not thinking straight. I'm posting this question. Hopefully I get a reply in the morning. I have two tables. TABLE 1 - PRODUCTS TABLE 2 - LIKES I am a User who has posted these products. I want to find out ALL the Likes I have received for all my products. Here is my code. $find_products = $db->prepare("SELECT product_id FROM products WHERE user_id = :user_id"); $find_products->bindParam(':user_id', $my_user_id); $find_products->execute(); $result_products = $find_products->fetchAll(PDO::FETCH_ASSOC); if(count($result_products) > 0) { foreach($result_products as $row) { $product_id = $row['product_id']; $find_likes = $db->prepare("SELECT like_id FROM product_likes WHERE product_id = :product_id"); $find_likes->bindParam(':product_id', $product_id); $find_likes->execute(); $result_likes = $find_likes->fetchAll(PDO::FETCH_ASSOC); if(count($result_likes) > 0) { $get_likes = 0; foreach($result_likes as $row) { $get_likes++; } } } } The issue with the above code is that It only shows the Likes if I echo inside the foreach loop. And it'll show combined Likes from each of my products. But I want to actually combine ALL the Likes from ALL the products and be able show them as a single number, outside of the foreach loop. How do I do that?
  23. Last week
  24. Thanks for the replies. I have made progress where all columns of the html table populate correctly, except for the PAYER_NAME column: $ads_list1 = ''; $pt->videos = $get_videos; $get_videos = $db->rawQuery("SELECT DISTINCT(v.id), v.*, upv.earned_amount as earned_amount, upv.id_user as id_user, upv.time_date as time_date FROM u_paid_videos AS upv LEFT JOIN " . T_VIDEOS . " AS v ON (upv.id_video = v.id) WHERE upv.id_user = {$user->id} AND upv.time_date ORDER BY upv.id DESC"); $pt->videos = $get_videos; if (!empty($get_videos)) { $len = count($get_videos); foreach ($get_videos as $key => $video) { $video = PT_GetVideoByID($video, 0, 0, 0); $pt->last_video = false; if ($key == $len - 1) { $pt->last_video = true; } $ads_list1 .= PT_LoadPage('transactions/list',array( 'ID' => $video->id, 'PAYER_NAME' => $user->id, 'VIDEO_NAME' => $video->title, 'AMOUNT' => $video->earned_amount, "CURRENCY" => $currency, 'TIME' => date("Y-m-d h:i A (T)", strtotime($video->time_date)) )); } } I'd like the PAYER_NAME data to come from the db table: 'u_paid_videos' > 'id_user' column. Any ideas, suggestions are appreciated
  25. Perhaps you can make use of the get_class() function
  26. You have to be kidding. This post is meaningless to almost anyone who reads it. I understand that there is a language problem but you don't even attempt to make clear what you are using, what you are doing nor what any of your code even looks like. Questions: What is "getevent()"? What is "Mage"? Where is this printing taking place? What is "checkout_cart_product_add_after"? A function you wrote? Part of a package you are trying to learn about?
  27. Hello! Google calendar event options has functionality to email guests : https://prnt.sc/ot3vbk and it looks like 1 time function. If there is a way Google calendar event to keep listing of email guests and trigger emails to them periodically? Also I need these email guests to import/export, as I make app with import/export of Google calendar events. Thanks!
  28. How to self check what event i am using, my event : <checkout_cart_product_add_after> how to print, i tried : $event = $observer->getEvent()->getName(); Mage::log($event, null, 'logfile.log'); its not printing
  29. Now you've had time to digest the manual, you should have something like this... $sql = "INSERT INTO `customer` (`FirstName`, `LastName`, `Address`, `Telephone`, `Email`, `SubscribeMailings`) VALUES (?, ?, ?, ?, ?, ?)"; $stmt = $conn->prepare($sql); $stmt->bind_param('ssssss', $Firstname, $Lastname, $Address, $Telephone, $email, $SubscribeMailings); if ($stmt->execute()) { $_SESSION['Customer_ID'] = $conn->insert_id; header('location: report.html'); // if result is true bypasses to the page. } else { $_SESSION['Customer_ID'] = null; echo "details could not be inserted.<br />"; }
  1. Load more activity
  • Member Statistics

    • Total Members
    • Most Online

    Newest Member
  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.