Announcement

Collapse
No announcement yet.

Hook to provide a Membership Number on Paid Subscription page

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

  • Hook to provide a Membership Number on Paid Subscription page

    Our paid up members need a membership number associated with their subscription. Is it possible to add this to the payments.php page beneath the Date From: Date To: that is displayed next to the subscription? E.g. what hook can I use in a plugin to display it?

    Secondly, how do i generate a membership number unique to the user? Is there an existing column or table in the database that could be used?

  • #2
    Uhh, I don't really understand what you're asking for, each user has a unique id (two or three) their username, their email, and their userid (system number).

    Comment


    • #3
      We use a three or four digit membership number currently maintained in excel. I want vBulletin to generate this and display it on the paid subscriptions page next to the date the subscription runs from/ to. If there is already a column (like userid) that could be used as a membership number, how do i display this on the paid subscriptions page? E.g. what hook do I configure in the plugin and what code do I put in?

      Comment


      • #4
        If you mean you want it displayed in the Admin CP Paid Subscriptions list of users, there are no hooks there- you'd need to manually edit the PHP file. In either case help with custom coding can be found at www.vbulletin.org.

        Comment


        • #5
          No, I need this on payments.php so the user can see their number! Is there a guide to the coding/ hooks etc?

          Comment


          • #6
            OK, after some guesswork I have a plugin that displays the userid on the subscriptions

            In the event someonelse needs to achieve something similar here's a quick guide:

            Modify the template to include a hook to insert your text:
            Template subscription.activebit
            Code:
            <li class="blockrow floatcontainer">
             <dl class="stats">
              <dt>{vb:rawphrase start_date}</dt>
               <dd>{vb:raw joindate}</dd>
              <dt>{vb:rawphrase expiry_date}</dt>
               <dd>{vb:raw enddate}</dd>
              {vb:raw template_hook.subscription_activebit}
             </dl>
             <p class="description">{vb:raw subscription.title}</p>
            </li>
            Add New Plugin
            Product: vBulletin
            Hook: paidsub_list_activebit
            Title: Membership Number
            Exec. order: 5
            PHP Code:
            Code:
            $template_hook['subscription_activebit'] .= '<dt>Number</dt><dd>' .$vbulletin->userinfo['userid']. '</dd>';

            Comment


            • #7
              hi.. i'm tried to show on header paid subscribe users expire day... or days left...
              how can i show this?

              i couldnt show..
              i added to {vb:raw subscribedbits} but nothing changed...
              how can i activate this code...
              or is there another way how can i show?

              Comment

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