Announcement

Collapse
No announcement yet.

Is it possible to get the userID of the current vB5 user, without coding a full-fledged vB5 plugin/extension/product?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vbSuperfan
    replied
    Originally posted by Wayne Luke View Post
    You can put whatever you want within 200 characters in the replacement field when creating a custom BBCode in the AdminCP.

    If you're implementing your BBCode using some other method, then you will need a full addon product so it can be properly registered and parsed with the code.
    I've tried this now, but Javascript doesn't execute when viewing posts in the Mobile Suit apps, so it's not showing up there, even though it works when viewing the forum post in a web browser.

    So, how would I be able to access/output the pageData.userid Javascript value in a post when viewed from the mobile apps too?

    If completely impossible, isn't there any other way to get hold of the user's UserID from a BB code?

    Since Javascript seems to be inaccessible from the Mobile Suite apps, I guess the only option would be to extract the user ID on the server side then?

    Is it possible to create custom (PHP based) BB codes in vBulletin 5? I read somewhere that this is only possible in vB4, but impossible in vB5, is this true? Otherwise, how?

    And to clarify, what I want is a BB code that outputs the User ID of the user viewing the thread, so that I could output something like:

    "Your user ID is: 1234"

    Which would display a different number for each different user viewing the thread (that is, their own user ID).
    Last edited by vbSuperfan; Wed 21st Aug '19, 5:28pm.

    Leave a comment:


  • lange
    replied
    For the record, a free characters counter online is showing 570 characters on my 5.5.0 custom BBcode (empty spaces included).

    Leave a comment:


  • Wayne Luke
    replied
    Maybe it was inadvertently fixed. I have an open issue on it so will have to recheck it.

    Leave a comment:


  • lange
    replied
    Originally posted by Wayne Luke View Post
    You can put whatever you want within 200 characters in the replacement field when creating a custom BBCode in the AdminCP
    Is it new? In the latest versions of 5.5x only? Can we change this max value somewhere in the code?

    I have a custom BBcode with over 200 characters in the replacement field for my version 5.5.0 and I am very happy with that.
    Last edited by lange; Sun 11th Aug '19, 11:19am.

    Leave a comment:


  • vbSuperfan
    replied
    Ok, excellent, thanks!

    Leave a comment:


  • Wayne Luke
    replied
    You can put whatever you want within 200 characters in the replacement field when creating a custom BBCode in the AdminCP.

    If you're implementing your BBCode using some other method, then you will need a full addon product so it can be properly registered and parsed with the code.

    Leave a comment:


  • vbSuperfan
    replied
    Ok, sounds great!

    Will I be able to run arbitrary javascript code inside BB codes then to access this you say, and will this work equally well also when users are accessing my forum and viewing these posts from my vBulletin Mobile Suite mobile apps too?

    Leave a comment:


  • Wayne Luke
    replied
    The currently viewing user's ID will be in the Javascript pageData object. You can access that object with your own Javascript.

    The code restricts a BBCode's replacement text to 200 characters at this time. That could be a severe limitation.

    Leave a comment:


  • Is it possible to get the userID of the current vB5 user, without coding a full-fledged vB5 plugin/extension/product?

    I need to create a BB code that loads an iframe (very much like video embedding BB codes do), but I need to include the vBulletin userID of the current user as a parameter in the URL loaded in this iframe.

    I therefore need to know if there is any way to access the userID of the currently logged in vBulletin 5 user, and use it in the HTML of my custom BB code, without coding a full-fledged vB5 plugin/extension/product?

    Is there?

Related Topics

Collapse

Working...
X