Jyoti Rani
-
Posts
76 -
Joined
-
Last visited
Content Type
Downloads
Release Notes
IPS4 Guides
IPS4 Developer Documentation
Invision Community Blog
Development Blog
Deprecation Tracker
Providers Directory
Forums
Events
Store
Gallery
Posts posted by Jyoti Rani
-
-
On 10/19/2023 at 5:13 PM, Adriano Faria said:
1: You need to have a local install of the board (with Apache PHP/MySQL, or a Wampserver, etc.).
2: upload the dev tools:
3: Enable the developer mode:
4: create a plugin with 2 code hooks in the classes I pointed above.
Hello adriano,
I am able to complete step 1,2,3 specified. But as you mentioned I have to write the code in which file among the below plugins\hooks.php file
'\\IPS\\forums\\Forum' =>array (2 =>array ('file' => 'applications/cms/hooks/Forum.php','class' => 'cms_hook_Forum',),),'\\IPS\\forums\\modules\\admin\\forums\\forums' =>array (3 =>array ('file' => 'applications/cms/hooks/forums.php','class' => 'cms_hook_forums',),), -
1 hour ago, teraßyte said:
Check that mod_rewrite is available and enabled.
You can disable FURLs as a workaround, but it would be better to get mod_rewrite working.
Thanks a lot TeraByte. Now the urls working.
-
On 10/20/2023 at 7:01 PM, Nathan Explosion said:
All the files you need are included in the ZIP file for the suite, downloadable from the client area.
Its available and that error has been removed. Next issue which i m facing is
I am able to open only pages like below link.
http://localhost/marketing_version4.7/index.php?app=cms&module=pages&controller=page
But when i run urls like below
http://localhost/marketing_version4.7/discover/
http://localhost/marketing_version4.7/leaderboard/
http://localhost/marketing_version4.7/login/
They are taking me to default page of WAMP server. Rather than going to their specific module.
-
25 minutes ago, Marc Stridgen said:
You would need to make sure that file is both present, and indeed readable. It seems its not currently, unfortunately
This file is not available at the particular location. Is there any way to get those ?
-
-
After doing the steps given the articles and suggested by you. When i run the folder at my local, i am getting below error. I checked in the specified location but could not found the file specified. Can someone guide please?
file_get_contents(D:\wamp64\www\marketing_version4.7/applications/forums/data/versions.json): Failed to open stream: No such file or directory
-
14 minutes ago, Adriano Faria said:
- New topic: hook on \IPS\forums\Topic:
public static function createFromForm( $values, \IPS\Node\Model $container = NULL, $sendNotification = TRUE ) { $item = parent::createFromForm( $values, $container, $sendNotification ); //do your stuff return $item; }
- New post: hook on \IPS\forums\Topic\Post:
public static function create( $item, $comment, $first=FALSE, $guestName=NULL, $incrementPostCount=NULL, $member=NULL, \IPS\DateTime $time=NULL, $ipAddress=NULL, $hiddenStatus=NULL, $anonymous=NULL ) { $reply = parent::create( $item, $comment, $first, $guestName, $incrementPostCount, $member, $time, $ipAddress, $hiddenStatus, $anonymous ); //do your stuff return $reply; }
Hey Adriano,
I have to write the above code in which file? As per the guide i m setting up developer mode at local.
Do i need developer mode at local to write above code? Or there is any other way to do this?
-
25 minutes ago, Adriano Faria said:
New post or new topic?
New Post as well as New Topic.
-
Just now, Marc Stridgen said:
There is no specific link on how to convert from 3.4 to 4.7 hooks, no. Its an entirely different platform, so it wouldnt be so much 'conversion' as rewriting them entirely
So, if I had to perform an action when user creates a new Post, then can you suggest the process to be followed in new version?
-
On 10/17/2023 at 11:41 AM, DawPi said:
You have given the general link. Any specific link to convert the hooks in previous i.e. 3.6 version to new 4.7 version will help me a lot.
Right now which I understand is that, I need to enable developer mode, then I can start creating plugins. But i m still not sure about what's next steps? Right now trying to setup developer mode at local.
-
1 hour ago, Kirill Gromov said:
I think the problem is that you are calling jQuery at the very bottom of the page, you need to move the scripts under the jQuery call or vice versa.
I have removed the code which is coming in the bottom. Tried cleaning the cache as well. But its not working.
-
Hello All,
I tried using jquery validation in my form But its not working.
As per the understanding received from Forum itself, I have changed the settings to include the javascript under the head section.
Here is the url of the issue where i m facing it.
-
Hello Nathan,
I have a new Query here.
I have an simple HTML form. I want to use jquery validate. But its showing the above error.
I just included <script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script> this file in my code. and used the basic validations there. Can you please suggest whats wrong here.
-
-
36 minutes ago, Nathan Explosion said:
Good to see you got it working.
Thanks Nathan. I am able to solve this.
-
18 minutes ago, Nathan Explosion said:
You still have this in your code - remove it. - Its Removed
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
You also still have your JS loading set to "Just before the </body> tag" - change it to the setitng I mentioned. - In my invision default theme. Not able to find the settings which you have shared. Can you please share any link for this?
My theme is invision default theme.
-
49 minutes ago, Nathan Explosion said:
OK - I didn't mention anything about putting those items in the footer of the theme so that's your call.
And you haven't modified the theme setting that I indicated you could change.
And now you have this as your code
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js"></script> --> <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function() { jQuery('#example123').DataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": "https://beta.marketingcheckpoint.com/admin/mailing/ajax_mail_history_dt10.php" }); }); </script>
And this as your error:
Why? You've commented out BOTH the jquery line and the datatables line, and you aren't loading the datatables JS at a later point. Plus you are using "jQuery" instead of "$"
Use this code in the block, modify the theme setting I indicated, and then advise if it doesn't work:
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#example').DataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": "https://beta.marketingcheckpoint.com/admin/mailing/ajax_mail_history_dt10.php" }); }); </script>
I have tried with $ as well. Also done the RnD with the suggestion you have shared.
I have changed like as you have suggested. But still no luck.
-
32 minutes ago, Nathan Explosion said:
OK - first bit of advice...you don't need this as jQuery (v3.7.0) will be provided by Invision's software:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
Secondly...in your screenshot, the error is $(...).DataTable but when I view the site, I see:
$(...).dataTable is not a function
The DataTable function is called "DataTable" so if you have do have it as "dataTable" in your code then correct that.
Finally though, and most important...your code is BEFORE the code that loads up all of Invision's JS. That is possibly why you decided to include that first line of script to load jquery up. You can change that in your theme settings:
I have updated the code above But its not reflecting.
For datatable i checked the Datatable Capital (D) issue as well. Still no luck. Any other ways to resolve this ?
-
26 minutes ago, Nathan Explosion said:
It may be in the block, but is it loaded on the site?
Provide a link to your page with the block on it.
https://beta.marketingcheckpoint.com/mail/test-page-for-invision/
Here is the link for the page
-
I have to list some rows using php code.
I am able to get them. But to add paging and Sorting to it, I m using third party script
of datatable e.g
https://legacy.datatables.net/examples/data_sources/server_side.html
But i m facing the below error
But all the js file is there in the script block.
Can someone help ?
-
Hi,
I have created a Block with pure Php code in AdminCP.
I am this block in Page. There is a call to ajax file in it.
Session is getting created in block code. But, When I am accessing this session variable in ajax file. its not available in it
-
12 minutes ago, teraßyte said:
Are you using a relative path to load the file? Try using a full one instead. You can find the full path of the suite files in the Support page.
How i can get CP_DIRECTORY variable in block php code?
-
28 minutes ago, Marc Stridgen said:
You would need to ensure you are using the correct location and that the file is readable there.
Im not sure what you mean here, as this appears to be essentially the same question
Issue is this when i m saving in admin section its parsing the content and loading the next line of code. Because the files are on the same location. But when i go to the frontend of the site to view the page
The url of the browser gets changed and its not able to find the file.
-
How to create hooks in invision new version?
in Developer Connection
Posted
I am able to access the hooks menu now.
I am able to add the hook on process form. But here the issue is I have to update the values in the table which is not the part of invision table.
For e.g i have table table1. I am using mysqli to update the values on the basis of userid. As this is the common column between ipcore_members and table1.
I am using one dbconnect.php file to connect to the db using mysqli driver.
But the $connection object is not available to me in the hook file.
Can you please help?