Search results

  1. abdfahim

    XF 2.1 Ajax works with GET, but throws server error with POST

    I didn't find any helpful documentation actually, but I remember searching for Ajax in this forum and some of the posts (including this) gave me hints.
  2. abdfahim

    Fixed Save button moves up in the presence of a floating notice

    The save button moves up in the presence of a floating notice. Tested with Chrome 78.0.3904.87 on Windows 10. Hopefully, it's not an undocumented feature :p. http://65b2116573294bf0.demo-xenforo.com/215/index.php?account/preferences
  3. abdfahim

    Chat 2 by Siropu [Paid]

    Thanks, @Siropu, it works as expected. However, I noticed 2 things: 1) Why the chat window is cropped? I used height = 500, shouldn't it resize accordingly? <xf:if is="$__globals.forum.node_id == 100"> <iframe src="https://www.example.com/chat/room/movie-suggestions.7/?fullpage=1" width="100%"...
  4. abdfahim

    Chat 2 by Siropu [Paid]

    Hi @Siropu, Is it possible to show a particular chat room only on a particular node/page? To elaborate, let say I have a forum node Movies. I would like to show chat room Movie suggestions below the breadcrumb under Movies node.
  5. abdfahim

    XF 2.1 Insert into database from an sql script

    The idea is to include an option in my Addon to browse and execute an SQL script file (from ACP, of course) containing only INSERT statements in order to populate my custom table. Is that a recommended approach? Any checks I should perform? I need to insert new data to my table on a regular basis.
  6. abdfahim

    Participants leaving a conversation & removing them from one

    Thanks. Recently I almost decided to purchase that but, while I have no problem purchasing addons, that addon offers too many things of which I just need this one basic option. So, I was concerned about the performance of my already overloaded site on a shared server.
  7. abdfahim

    Participants leaving a conversation & removing them from one

    Exactly what I am facing now! It's a PIA.
  8. abdfahim

    XF 2.1 Multiple $finder->fetch vs raw query

    Awesome, didn't think about that, thanks!
  9. abdfahim

    XF 2.1 Multiple $finder->fetch vs raw query

    Hi, Is there any performance difference between the following two? Objective: Get all records of the latest date $db = \XF::db(); $results = $db->fetchAll("SELECT * FROM my_table WHERE my_date IN (SELECT max(my_date) FROM my_table)"); $max_date = $finder->order('my_date'...
  10. abdfahim

    Add Font Awesome icons to the navigation

    Hi Chris, I would like to add an icon to the Nav item related to my addon by default. Under that circumstance, it's fine to edit Master Language, right? I don't see any other option. Note, this nav.mynewrout variable was automatically created once I defined the route.
  11. abdfahim

    XF 2.1 Hide ad in a custom node

    Oh, got it, $xf.reply.template Isn't it a bit unusual place to store template name?
  12. abdfahim

    XF 2.1 Hide ad in a custom node

    I am the developer, so I know the template name. But the question is, how can I add a conditional in advertisement manager to check the template name? Do I need to send a variable containing my template name from my class, or XF has some default variable which always stores the template name...
  13. abdfahim

    XF 2.1 Hide ad in a custom node

    I have a custom page which is accessible at example.com/portal-a. The page is loaded via an action class. What conditional should I use to hide advertisements on that page? I tried to get the template name, but couldn't really find out which variable stores that information. Tried {{...
  14. abdfahim

    XF 2.1 onChange with XF JS framework?

    I am following this link to write onClick and onChange functionality with JS framework . onClick seems to be easy, but I couldn't find any way to implement onChange Isn't that even possible available? I am trying to mimic the following jQuery("#mySel").change(function() {...
  15. abdfahim

    XF 2.1 Ajax works with GET, but throws server error with POST

    Right, I assumed that. But the only template popped up when I search "XF.ajax" in the XF system is two_step_authy where I was confused with a few things. Hence I fall back to jQuery. It would have been nice if the official document included a syntax for XF.ajax call. Thanks anyway.
  16. abdfahim

    XF 2.1 Ajax works with GET, but throws server error with POST

    I have a page that outputs JSON from a controller class. When I try that page with an Ajax request with Type = GET, I get the exact same response as above, as expected. However, when I send the request with POST, I get 400 Bad request from the server. I also tried with apps (e.g., RESTed and...
  17. abdfahim

    XF 2.1 Call an action class through Ajax

    I solved the JSON issue by creating a custom view class. However, I am still getting 400 Bad request from Server when I set ajax type = POST. It works perfectly for ajax type = GET.
  18. abdfahim

    XF 2.1 Does each finder->pluckForm make individual query?

    I would like to get numeric arrays for each column of my database table. So, I am doing the following $date_q = '2018-01-01'; $finder = $this->finder('Fahim:MyEntity'); $finder->where('date', '>', $date_q); $colA = array_values($finder->pluckFrom('colA')->fetch()->toArray()); $colB =...
  19. abdfahim

    XF 2.0 Proper way to return JSON

    Oh, thanks! Now I get pure JSON output from my page.
  20. abdfahim

    XF 2.0 Proper way to return JSON

    Thanks, I am trying to follow the same for an Ajax call, but getting 400 bad Request from the server. Can't the same strategy be used with an Ajax call? jQuery.ajax({ type: "POST", url: "{{ link('portal-a/reload') }}", // portal-a/reload is the route to the action class...
Top