Announcement

Collapse
No announcement yet.

Where are Style Templates Stored?

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

  • Where are Style Templates Stored?

    I had a board that crashed and I just reinstalled a new one. I have a backup of my old one but the question is where are the Custom Templates stored? I am trying to recreate something I did before and I don't know if it was a hack or just html code. If I could see the old custom template I could recreate the new one.

    Any ideas?
    PlayGameZone.Com
    http://miniprofile.xfire.com/bg/bg/type/3/freebase.png

  • #2
    The templates are all stored in the template table.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Which is where? SQL D-Base? I need to look at the code of the old template. I need to look exactly at the file that says "X" Code is in "X" template from "X" style.

      Code:
      <table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
       <thead>
       <tr>
      <tr>
      <td class="alt1">
       etc etc etc etc
      Am I making any sense?

      Or even better, where can I find the old "my"-style.xml file? Wouldn't the style.xml tell me the same thing possibly?
      Last edited by freebase69; Mon 24 Apr '06, 2:33am.
      PlayGameZone.Com
      http://miniprofile.xfire.com/bg/bg/type/3/freebase.png

      Comment


      • #4
        Why not just look in the old templates via the style manager?

        If its not in the style manger its likely not in the database either.

        Comment


        • #5
          WOOT!!! I FOUND IT!!! I just had to parse out all the // and the r/n/ from the sql query. Exactly what I was looking for.


          Originally posted by Zachery
          Why not just look in the old templates via the style manager?

          If its not in the style manger its likely not in the database either.
          Because I just have a backup of the old site. I don't have a running old site since it died and I don't know exactly what caused it. I have my suspucions but in the end it worked out.


          NOTE:
          Anyone else that has/had this problem what I did was look for a specific template in my main sql backup. For example:

          I was looking for adv_portal_"name". I had it set up to use each styles alt=1 and alt=2 color scheme and I couldn't remember how I built the custom code. I searched the entire backup and found the template. Then I just parsed out what mysql put in extra. For blank spaces it uses // and it also added a few other characters. Then I just recreated the new template added the code and viola! It worked.

          BTW the adv_portal_xxxxx is a CMPS portal file in case you didn't know already.

          This is what it looked like in mysql:
          Code:
          INSERT INTO `template` (`templateid`, `styleid`, `title`, `template`, `template_un`, `templatetype`, `dateline`, `username`, `version`, `product`) VALUES (2938,17,'adv_portal_xxx','<tr>\r\n<td class=\\\"alt1\\\">\r\n<div align=\\\"center<td class=\\\"thead\\\" align=\\\"center\\\"><span class=\\\"[URL="http://www.vbulletin.com/forum/"]\\\"><script[/URL] language=\\\"JavaScript\\\" src=\\\"[URL="http://A NEWS SITE NEWSFEED/news/rss/js_rss_parser.php?id=36\\\"]http://A NEWS SITE NEWSFEED/news/rss/js_rss_parser.php?id=36\\\[/URL]" type=\\\"text/javascript\\\"></script>\r\n<script language=\\\"JavaScript\\\" type=\\\"text/javascript\\\">\r\nfor (count = 0; count < numHeadlines; count++) {\r\n   document.write(\'<a href=\\\"\' + link[count] + \'\\\" target=_blank>\' + headline[count] + \'</a><br>\');\r\n} \r\n</script\r\n</a></div>\r\n</span>\r\n</td>\r\n</tr>','<tr>\r\n<td class=\"alt1\">\r\n<div align=\"center<td class=\"thead\" align=\"center\"><span class=\"\"><script language=\"JavaScript\" src=\"[URL="http://A NEWS SITE NEWSFEED/scripts/news/rss/js_rss_parser.php?id=36\"]http://A NEWS SITE NEWSFEED/scripts/news/rss/js_rss_parser.php?id=36\[/URL]" type=\"text/javascript\"></script>\r\n<script language=\"JavaScript\" type=\"text/javascript\">\r\nfor (count = 0; count < numHeadlines; count++) {\r\n   document.write(\'<a href=\"\' + link[count] + \'\" target=_blank>\' + headline[count] + \'</a><br>\');\r\n} \r\n</script\r\n</a></div>\r\n</span>\r\n</td>\r\n</tr>','template',1129671100,'xxxxx','3.5.0','vbulletin');
          After I parsed all the junk out this is what it looked like
          Code:
          <tr>
          <td class="alt1"><div align="center"<td class="thead" align="center"><span class="">
          <script language="JavaScript" src="[URL="http://A NEWS SITE NEWSFEED/news/rss/js_rss_parser.php?id=36"]http://A NEWS SITE NEWSFEED/news/rss/js_rss_parser.php?id=36[/URL]" type="text javascript">
          </script>
          <script language="JavaScript" type="text javascript">for (count = 0; count < numHeadlines; count++) {   document.write('<a href="' + link[count] + '" target=_blank>' + headline[count] + '</a><br>');}
          </script>
          </a>
          </div>
          </span>
          </td>
          </tr>
          I dunno if this will help anyone else but if it saves you the headache of trying to remember how you coded something at least I helped some.
          Last edited by freebase69; Mon 24 Apr '06, 3:20am.
          PlayGameZone.Com
          http://miniprofile.xfire.com/bg/bg/type/3/freebase.png

          Comment

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