Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 18 Jun 2015, 21:39
Wedframe Wedframe is offline
 
Join Date: Mar 2013
ajax requests for postbit

Hello! I try to make custom plugin, and try to figure out, how I can use ajax requests for suitable changes in post content.
On hook bbcode_create:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and on bbcode_fetch_tags

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

with js:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but in debugger I have:
postid = undefined
--------------------------------------
So... whats right syntax for this operation?
And next... how I can resolve bbcode-parsed text from current post?
Thanks!

Last edited by Wedframe; 20 Jun 2015 at 17:42.
Reply With Quote
  #2  
Old 22 Jun 2015, 00:07
Wedframe Wedframe is offline
 
Join Date: Mar 2013
Please.... I dont ask to many((((
I`m just need to know right syntax to properly receive a postid in javascript.
Maybe at least someone tell in which files of vB, I can see similar operation?
Reply With Quote
  #3  
Old 23 Jun 2015, 18:21
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Seems like $post['postid'] is not defined yet on that hook, you can try $post['id'] or something like that but it could be more complex. Usually when I have this type of problems I search the file containing the hook bbcode_fetch_tags and see what's going on there. You may find there some variables containing the post id
Reply With Quote
  #4  
Old 24 Jun 2015, 16:12
Wedframe Wedframe is offline
 
Join Date: Mar 2013
Thanks, Andrea!
Your right.

I found how to define postid on any hooks)))

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And then I need it, I use:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

At least it worked during tests...

How you think its good idea, or may be better found another way?

Last edited by Wedframe; 25 Jun 2015 at 12:23.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 02:39.

Layout Options | Width: Wide Color: