Announcement

Collapse
No announcement yet.

Mass forum/sub-forum tagging.

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mass forum/sub-forum tagging.

    I am looking for a way to apply tag(s) to an entire sub-forum.
    e.g. Under a GAMING forum, I have Playstation and Atari sub-forums.
    I want to add the tags gaming and Atari and 2600 to all posts under the Atari sub-forum.

    vB3 had something like it http://www.vbulletin.org/forum/showthread.php?t=180906
    But so far as I can tell, vB5 has no such function.
    http://www.vbulletin.com/forum/forum...ing-cache-size
    Also, there is no auto-tagging. It would be nice if a post with no tags could pick a keyword from content or forum.

    Has anyone created a tool/script/function to mass add tags?
    I am considering doing a SQL dump, GSAR tables, and attempt a manual adding of current tags.


    Ewe... I have found the TAGID and TAGTEXT tables, but they use CONTENTID, USERID and NODEID tables.
    All empty ones would have to be generated and then modified.
    My head hurts thinking about it.
    Would appreciate ideas.


    And while I am thinking about it, is there a way to add tagging to RSS aggregation?
    If I am pulling a feed from AtariAge, then auto tagging any of those threads would include Atari as a tag.

    After all, what is the point of an engine like Cloud Tag if there are no tags to fuel it?
    Lets face it, SEO's thrive on tags/keywords, but users don't generally like to take the time to tag a post.
    Mass tagging, auto tagging and RSS tagging are some seriously overlooked functions.
    Last edited by Felix2; 11-03-2016, 11:04 PM.

    #2
    In the tags API, there's updateUserTags($nodeid, $taglist) function that you can call. You have to call that multiple times and pass the nodeid of the first post and the list of tags to add.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      Originally posted by glennrocksvb View Post
      In the tags API, there's updateUserTags($nodeid, $taglist) function that you can call. You have to call that multiple times and pass the nodeid of the first post and the list of tags to add.
      Okay, a little out of my league here. Is this something like using the FUNCTION.PHP?... only instead I would use TAGS.PHP?... ?
      In this case, the node ID Atari (Node ID: 4385) is 4385 and the taglist is games, atari.

      Does that make the process a calling of /tags.php?do=updateUserTags,nodeid=4385,taglist=games+atari ?

      Or am I way off here and the tags API is something all together different?

      And example if you would please.

      Comment


        #4
        Alright, I used addTags API function instead of updateUserTags.

        In templates, you can call the API like this:
        Code:
        {vb:set nodeid, 4385}
        {vb:set taglist, {vb:php array, 'games', 'atari'}}
        {vb:data tags, addTags, {vb:raw nodeid}, {vb:raw taglist}}
        
        <vb:comment>output api call result to debug</vb:comment>
        {vb:debugvardump tags}

        In a PHP module:
        PHP Code:
        $api Api_InterfaceAbstract::instance();
        $nodeid 4385;
        $taglist = array('games''atari');
        $tags $api->callApi('tags''addTags', array($nodeid$taglist));

        //output api call result to debug
        var_dump($tags); 
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #5
          In jQuery + AJAX:

          Code:
          $.post(vBulletin.getAjaxBaseurl() + '/ajax/api/tags/addTags', { nodeid: 4385, taglist: ['games', 'atari'] }, function(response) {
              //output api call result to debug
              console.log(response);
          });
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #6
            Originally posted by glennrocksvb View Post
            In jQuery + AJAX:

            Code:
            $.post(vBulletin.getAjaxBaseurl() + '/ajax/api/tags/addTags', { nodeid: 4385, taglist: ['games', 'atari'] }, function(response) {
            //output api call result to debug
            console.log(response);
            });
            I added tags "auto tagging" and "mass tagging" in this thread using this code (only users with permissions to add tags like Admin can do this, of course). But when I reloaded the page, it still didn't display the added tags. Even clearing system cache in AdminCP did nothing too. But when I edited the first post, I could see the added tags while in edit mode and I had to save the post even without changing anything to make the added tags appear. Weird.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #7
              I have run into similar issues.
              And using the PHP approach I get-
              array(6) { ["tags"]=> array(2) { [0]=> array(3) { ["tagtext"]=> string(5) "atari" ["userid"]=> string(1) "1" ["tagid"]=> string(2) "52" } [1]=> array(3) { ["tagtext"]=> string(5) "games" ["userid"]=> string(1) "1" ["tagid"]=> string(2) "49" } } ["userid"]=> int(1) ["nodeid"]=> int(4385) ["maxtags"]=> bool(false) ["maxusertags"]=> bool(false) ["canmanagetags"]=> bool(true) }
              When I reload the page I see, Tags: None
              If I edit, I see tags games, atari.

              The site has over 150,000 threads, so this isn't going to cut it

              Will give the template version a try, but I think somewhere something is missing. But if not in cache, where?

              Why is it always the seemingly simple things?

              Attempted the template approach.
              Made no changes, even when editing thread.
              Get back message-
              var_dump: $tags
              NULL


              Also of note. None of these approaches has an affect upon the Tag Cloud.
              When a tag is selected, nothing new appears.

              Just for giggles, tested the AJAX code.
              I don't get any response using that option.
              When I reload the page I see, Tags: None
              If I edit, I see no tags, which differs from your results.
              Last edited by Felix2; 11-04-2016, 08:17 AM.

              Comment


                #8

                That is precisely what I am seeking, but it is only for vB4.

                Comment

                Users Viewing This Page

                Collapse

                There is 1 user viewing this forum topic.

                • Guest Guest

                Latest Posts

                Collapse

                Working...
                X
                Searching...Please wait.
                An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                Please push the back button and reload the previous window.'
                An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                Please push the back button and reload the previous window.'
                An internal error has occurred and the module cannot be displayed.
                There are no results that meet this criteria.
                Search Result for "|||"