Announcement

Collapse
No announcement yet.

How to count the number of characters of a post?

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

  • How to count the number of characters of a post?

    I'd like to know the number of characters of the first post of each page. It's possible to do this?

    For example:

    If "number of characters" > 5000

    "do option1!

    else

    "do option 2"

    End if


    Thanks.
    Invertir en Bolsa

  • #2
    This isn't a variable that is currently exposed to templates as there is no need to do so. We don't even store the number of characters in a post. You would need to write a plugin that checked the pagetext field of the post table and then registered the value as a variable for use in templates. For help with this, you need to visit www.vbulletin.org.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      Thanks, Wayne. I think this would be useful for placing ads of differente sizes, for example.
      Invertir en Bolsa

      Comment


      • #4
        What about "strlen". I've seen in several post, but I'm not sure if this could fit what I want to do.

        For example, It would be possible something like:

        If strlen (text of the first post of the page) > 5000

        Show Ad 1

        else

        Show Ad 2

        End if

        Thanks.
        Invertir en Bolsa

        Comment


        • #5
          We officially don't support modifications, so www.vbulletin.org would be the proper place to ask for this.
          No private support, only PM me when I ask for it. Support in the forums only.

          Comment


          • #6
            Thanks, Harmut.
            Invertir en Bolsa

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X