Jump to content

Alex CA

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Alex CA

  1. @tpr I am looking for something on PW 2.7. It is going to be difficult for me to upgrade cause I have just been brought into this project and am new to PW itself
  2. @jensweigel @elabx I downloaded the mathjax plugin and also the other dependencies which included clipboard,dialogui,lineutiles,notification and widget. When I go the group of checkboxes , I am able to see my field on my page as long as keep mathjax and widget plugins unchecked. As soon as i check them, there is a blank space in edit page option where the field is present. However, when I view the page, the data that had been entered (before I checked these plugins) is displayed (without the latex rendering). I also tried the toolbar option(through PW GUI) of both Mathjax and mathjax, but it didn't work Could it be because of the version? The CKeditor page states its for version 4.3+ and I have the Processeswire module version of 1.5.4 Is there any other alternative. Here is a snippet of my config file CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.uiColor = '#AADC6E'; config.extraPlugins = 'widget'; config.extraPlugins = 'lineutils'; config.extraPlugins = 'dialogui'; config.extraPlugins = 'dialog'; config.extraPlugins = 'notification'; config.extraPlugins = 'clipboard'; config.extraPlugins = 'mathjax'; };
  3. @jensweigel Could you or someone please list out the steps on how you were able to integrate Mathjax? I am kind of new to Processwire and am working with Processwire 2.7 and ckeditor (module version 1.5.4) Thanks!
  4. @Macrura I think I will be going to the library of Mathjax (https://www.mathjax.org) I was able to include it and use it using HTML. However, when I try on a field ( textarea) and load try to render it from php using echo, it does not work. Does anyone know what could be the issue?
  5. I have a few fields which are using the textField filedtype. Some of the data for these fields contain LaTeX code. However, the CKEditor does not have the abilities to parse it. Is there any solution for this problem? I am currently using Processwire 2.7
  6. @Macrura @Martijn Geerts , could you help me with this issue?
  7. I do have another task what I am trying to solve with the help of RSS module. Suppose my rss feed is based on a page which uses template A and it is pulling data from all templates on the website which has template B (which is say b_title and b_description). Now, I have another field in template B which has a filed type Page(lets called this field b_page) which essentially is for pages of another template (let's call it template C).This template C consists of a field called c_img. Now I want my rss feed template(A.php) to pull the title and description from template B and the image for the rss feed from template C. How do I achieve the retrieval of the image? I have tried representing my problem with a picture below. My current code looks similar to this: <?php // rss-feed.php template file // retrieve the RSS module $rss = $modules->get("MarkupRSSEnhanced"); // configure the feed. see the actual module file for more optional config options. $rss->title = "Latest updates"; $rss->description = "The most recent pages "; $items = $pages->find("tempalte=". $templateB .", sort=-modified,limit=20"); $rss->itemDescriptionField = 'b_Desc'; $rss->itemEnclosureField = 'b_page[0]->c_img'; // we take the first one since this field can consist an array of pages // send the output of the RSS feed, and you are done $rss->render($items); ?>
  8. @Macrura Thanks for all the help. The addHookProperty() did not work. Another simple solution (I should've tried it earlier ) is to directly use $rss->itemDescriptionField='e_desc|r_desc'
  9. @Macrura I did see how to instantiate the module. But how do I make module pick up r_desc and r_pic when it's generating the RSS feed when I select pages with template='Template1' and then make it pick e_desc and e_pic when the template is='Template2'. My condition for the page selector for my RSS feed is $pages->find("template=". $template1 ."|". $template2.", sort=-modified,limit=20");
  10. I was just using this module "MarkupRSSEnhanced" to generate my rss feed. My RSS feed specifically pulls data from 2 different templates. Though both these templates have the same title field called 'Title', their description field varies (one has r_desc and the other has e_desc) Is there a way where I can configure the model in such a way to pick up either of r_desc or e_desc (whichever is present on the template) I also have the same problem with adding the image to rss also since one has field name r_pic and the other has e_pic. PS-I cannot change the field names since I recently took over the project I am working on and it has been implemented by many others before me.
  11. In my search.php template, I am using $selector = "title|body%=$search_term, limit=50"; to find the top 50 search results for the page. I implemented this following this link https://processwire.com/api/selectors/ My question is how does the selector sort its results? Does it look at the number of time the $search_term has occurred in the page or does it start searching from the root page to all the children. Also, will this change if I do not put any limits to the search results?
  12. I was able to make it work. There was a type in the previous code which caused the issue.
  13. I am currently designing a search page for my website. While I am able to get both pagination and fieldtype caching enabled separately, I am not able to implement them together. I followed the following 2 pages - https://processwire.com/api/modules/markup-pager-nav/ https://processwire-recipes.com/recipes/set-up-search-index-with-fieldtypecache/ Is there any way where I can combine these 2 methods for my website? Here is a snippet of my code $q = $sanitizer->text($input->get->q); $q = $sanitizer->selectorValue($q); // Search the cacged fields for our query text. // Limit the results to 50 pages. $selector = "search_cache~=$q, limit=50"; // If user has access to admin pages, lets exclude them from the search results. if($user->isLoggedin()) $selector .= ", has_parent!=2"; // Find pages that match the selector $matches = $pages->find($selector); //Get range of paginated results $start = $matches->getStart() + 1; $end = $matches->getStart() + count($matches); $total = $matches->getTotal(); $content = "<p><b>Showing search results ". $start . " - ". $end . " of ".$total."</b></p>"; // did we find any matches? if($matches->count) { $content .= '<ul>'; foreach($matches as $match){ $content .= '<li>'. $match->parent->title . ': <a href="' . $match->url . '">' . $match->title . '</a></li>'; } $content .= '</ul>'; $content .= $matches->renderPager(array( 'listMarkup' => "<ul class='pagination'>{out}</ul>", 'nextItemLabel' => "Next", 'previousItemLabel' => "Previous", )); } else { // we didn't find any $content = "<strong>Sorry, no results were found.</<strong>"; }
  14. Hi, I am just getting started with a project which has been previously built using Processwire2.7. I was wondering if there was anyway to modify the admin screen when entering data for a template. For example, I have created a student template with fields : Name, Major,Insitution, is Graduate?(checkbox) and a hidden field : ' Graduate level' Now, whenever I check the 'is Graduate? ' checkbox on the admin panel when entering the data, I want to show the 'Graduate level' field. Since, this is a change on the view for the admin page, I am not quit sure if there is some way to achieve this. Does anybody know how I could achieve this? Thanks!
  15. Alright I found the error. I had to install the module after adding it
  16. I was just looking at this module Profields It states that except Repeater Matrix ProField ,everything works with Processwire 2.6+. I am currently using Processwire 2.7.2 and I primarily wan to make use of Table and Autolinks. Has anyone using Processwire2.7 faced any issue with this module? I am relatively new to Processwire and I do not want to end up buying a module which could have compatibility issues. Thanks
  17. Thanks! I have currently implemented it using jQuery and use the API and was wondering if there was a module
  18. I am fairly new to Processwire and using APIs and I wanted to implement a certain functionality for one of my templates. Suppose I want all pages that use template A to display wiki content associated with page->title in page->body . For example if page->title is "Google", I want the body to consist of the data present on https://en.wikipedia.org/wiki/Google I understand that one way of doing this is using APIs from Wikipedia (but I do not have good experience in working with APIs) Could someone guide me though the process or point me to an already available module for this functionality in Processwire?
  19. I am a newbie to Processwire and have been given a task to add some features to a website that has been already been developed. One of the fields (say Filed A), is of type Page. There are 100+pages in field A. A template Temp B uses this Field A and just displays the name of the pages of type Filed A selected for the page which uses the template B. Now, since there are many pages in Field A, it is displayed as a list and its gets difficult to scroll through the entire list in the admin page to find and add a particular entry from Field A. Could someone guide me if I could have a dynamic search bar for this field A which would work similar to how the search works on the processwire admin page? I want this search bar to be displayed right above the list of FieldA which will then dynamically improve the results as I type in the search box
×
×
  • Create New...