MyBB Community Forums

Full Version: How to grab Index template with SQL database and files?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Okay - I know this sounds so stupid. I recently was trying some new things with my index template. I reverted back to original and now I can't get the original coding. I have my SQL database and general cPanel backup but is there anyway to look at the index template?

I can't do a backup because that backup is from June but the Index code should be the same.

I really need this and any help is appreciated. Smile
Open you .sql file and search for the index template there.

Something like 'index' or index should do it. You will need to replace some code to put it directly into the ACP.
Easiest thing to do IMO would be to restore the backup into a local install. That way if you're not used to the Syntax of SQL you can just use the ACP of your local install to grab the template.
(2012-07-13, 07:21 AM)Omar G. Wrote: [ -> ]Open you .sql file and search for the index template there.

Something like 'index' or index should do it. You will need to replace some code to put it directly into the ACP.

Yeah but when I grab and paste the code it's all bunched up:

[Image: 9c78a73384f0a528f4a6a145f542b9e5.png]
You need to remove the \r \n etc
What I do, using Notepadd++, I replace all "\r\n" for "R_N", then change the settings to advanced (or something like that, in the search pop up) and change "R_N" for "\r\n".
if you can't do that post the template in
[code]Tags 
and i will do it for you
(2012-07-13, 07:56 PM)fma965 Wrote: [ -> ]if you can't do that post the template in
[code]Tags 
and i will do it for you

<html>\r\n<head>\r\n<title>{$mybb->settings[''bbname'']}</title>\r\n{$headerinclude}\r\n<script type="text/javascript">\r\n<!--\r\n        lang.no_new_posts = "{$lang->no_new_posts}";\r\n        lang.click_mark_read = "{$lang->click_mark_read}";\r\n// -->\r\n</script>\r\n</head>\r\n<body>\r\n{$header}\r\n{$ps_header_index}\r\n<a class="buttons" style="float: right;"></a>\r\n<a class="clickedbuttons" style="float: right;"></a>\r\n<br class="clear" />\r\n<!--Sidebar Start-->\r\n<div class="sidebar" style="width: 19%; float:right;">\r\n<table border="0" cellspacing="{$theme[''borderwidth'']}" cellpadding="{$theme[''tablespace'']}" class="tborder">\r\n<tr>\r\n<td class="thead"><strong>\r\nRegister Here\r\n</strong></td>\r\n</tr>\r\n<tr>\r\n<td class="trow1">\r\n<a href="http://tstk.net/member.php?action=register"><img src="images/register.png" width="100%" alt="Register Here" /></a>\r\n</td>\r\n</tr>\r\n</table>\r\n<br />\r\n<table border="0" cellspacing="{$theme[''borderwidth'']}" cellpadding="{$theme[''tablespace'']}" class="tborder">\r\n<tr>\r\n<td class="thead"><strong>\r\nTwitter Feed\r\n</strong></td>\r\n</tr>\r\n<tr>\r\n<td class="trow1">\r\n<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>\r\n<script>\r\nnew TWTR.Widget({\r\n  version: 2,\r\n  type: ''profile'',\r\n  rpp: 4,\r\n  interval: 30000,\r\n  width: ''auto'',\r\n  height: 360,\r\n  theme: {\r\n    shell: {\r\n      background: ''#960000'',\r\n      color: ''#ffffff''\r\n    },\r\n    tweets: {\r\n      background: ''#f2f2f2'',\r\n      color: ''#000000'',\r\n      links: ''#8f0611''\r\n    }\r\n  },\r\n  features: {\r\n    scrollbar: true,\r\n    loop: false,\r\n    live: false,\r\n    behavior: ''all''\r\n  }\r\n}).render().setUser(''TSTKForums'').start();\r\n</script>\r\n</td>\r\n</tr>\r\n</table>\r\n<br />\r\n</div>\r\n<!--Sidebar End-->\r\n \r\n<!--Forum Column Start-->\r\n<div class="forums" style="float: left;width: 80%;">\r\n{$tabmenu}\r\n{$forums}\r\n{$ps_footer_index}\r\n<script type="text/javascript">\r\n<!--//\r\nvar myflowers=new ddtabcontent("menutabs")\r\nmyflowers.setpersist(true)\r\nmyflowers.init()\r\n-->\r\n</script>\r\n \r\n</div>\r\n<br class="clear" />\r\n<!--Forum Column End-->\r\n \r\n{$boardstats}\r\n\r\n<center>\r\n<span class="smalltext" align="center">\r\n\r\n<span class="stat">{$stats[''numposts'']}</span>\r\n<strong>Posts</strong>\r\n\r\n<span class="stat">{$stats[''numthreads'']}</span>\r\n<strong>Threads</strong>\r\n\r\n<span class="stat">{$stats[''numusers'']}</span>\r\n<strong>Members</strong>\r\n\r\n<span class="stat">{$newestmember}</span>\r\n<strong>Newest Member</strong>\r\n\r\n<span class="stat">{$mostonline[''numusers'']}</span>\r\n<strong>Most Online</strong>\r\n\r\n</span>\r\n</center>\r\n \r\n{$footer}\r\n</body>\r\n</html>


Sorry to paste it all here. If it's too much trouble don't worry about it. I tried to remove all of the \r\n codes and it didn't work Sad
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
        lang.no_new_posts = "{$lang->no_new_posts}";
        lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$ps_header_index}
<a class="buttons" style="float: right;"></a>
<a class="clickedbuttons" style="float: right;"></a>
<br class="clear" />
<!--Sidebar Start-->
<div class="sidebar" style="width: 19%; float:right;">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
Register Here
</strong></td>
</tr>
<tr>
<td class="trow1">
<a href="http://tstk.net/member.php?action=register"><img src="images/register.png" width="100%" alt="Register Here" /></a>
</td>
</tr>
</table>
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
Twitter Feed
</strong></td>
</tr>
<tr>
<td class="trow1">
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
  version: 2,
  type: 'profile',
  rpp: 4,
  interval: 30000,
  width: 'auto',
  height: 360,
  theme: {
    shell: {
      background: '#960000',
      color: '#ffffff'
    },
    tweets: {
      background: '#f2f2f2',
      color: '#000000',
      links: '#8f0611'
    }
  },
  features: {
    scrollbar: true,
    loop: false,
    live: false,
    behavior: 'all'
  }
}).render().setUser('TSTKForums').start();
</script>
</td>
</tr>
</table>
<br />
</div>
<!--Sidebar End-->
 
<!--Forum Column Start-->
<div class="forums" style="float: left;width: 80%;">
{$tabmenu}
{$forums}
{$ps_footer_index}
<script type="text/javascript">
<!--//
var myflowers=new ddtabcontent("menutabs")
myflowers.setpersist(true)
myflowers.init()
-->
</script>
 
</div>
<br class="clear" />
<!--Forum Column End-->
 
{$boardstats}

<center>
<span class="smalltext" align="center">

<span class="stat">{$stats['numposts']}</span>
<strong>Posts</strong>

<span class="stat">{$stats['numthreads']}</span>
<strong>Threads</strong>

<span class="stat">{$stats['numusers']}</span>
<strong>Members</strong>

<span class="stat">{$newestmember}</span>
<strong>Newest Member</strong>

<span class="stat">{$mostonline['numusers']}</span>
<strong>Most Online</strong>

</span>
</center>
 
{$footer}
</body>
</html>

You need to remove the '' (double ') for ' (just one). Already done it for you.
(2012-07-13, 10:14 PM)Omar G. Wrote: [ -> ]
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
        lang.no_new_posts = "{$lang->no_new_posts}";
        lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}
{$ps_header_index}
<a class="buttons" style="float: right;"></a>
<a class="clickedbuttons" style="float: right;"></a>
<br class="clear" />
<!--Sidebar Start-->
<div class="sidebar" style="width: 19%; float:right;">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
Register Here
</strong></td>
</tr>
<tr>
<td class="trow1">
<a href="http://tstk.net/member.php?action=register"><img src="images/register.png" width="100%" alt="Register Here" /></a>
</td>
</tr>
</table>
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>
Twitter Feed
</strong></td>
</tr>
<tr>
<td class="trow1">
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
  version: 2,
  type: 'profile',
  rpp: 4,
  interval: 30000,
  width: 'auto',
  height: 360,
  theme: {
    shell: {
      background: '#960000',
      color: '#ffffff'
    },
    tweets: {
      background: '#f2f2f2',
      color: '#000000',
      links: '#8f0611'
    }
  },
  features: {
    scrollbar: true,
    loop: false,
    live: false,
    behavior: 'all'
  }
}).render().setUser('TSTKForums').start();
</script>
</td>
</tr>
</table>
<br />
</div>
<!--Sidebar End-->
 
<!--Forum Column Start-->
<div class="forums" style="float: left;width: 80%;">
{$tabmenu}
{$forums}
{$ps_footer_index}
<script type="text/javascript">
<!--//
var myflowers=new ddtabcontent("menutabs")
myflowers.setpersist(true)
myflowers.init()
-->
</script>
 
</div>
<br class="clear" />
<!--Forum Column End-->
 
{$boardstats}

<center>
<span class="smalltext" align="center">

<span class="stat">{$stats['numposts']}</span>
<strong>Posts</strong>

<span class="stat">{$stats['numthreads']}</span>
<strong>Threads</strong>

<span class="stat">{$stats['numusers']}</span>
<strong>Members</strong>

<span class="stat">{$newestmember}</span>
<strong>Newest Member</strong>

<span class="stat">{$mostonline['numusers']}</span>
<strong>Most Online</strong>

</span>
</center>
 
{$footer}
</body>
</html>

You need to remove the '' (double ') for ' (just one). Already done it for you.

How did you do that so fast? I was thinking it was probably a view mode in Notepad +.
Pages: 1 2