Hello Guest
No Avatar
Sign In to Remove
Posts: 
400
Reputation: 
20
Posted: February 18, 2011, 9:39 AM  -- Last Edit: October 15, 2014, 12:09 AM by MLM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
THEME OF THE MONTH ON SMF: http://www.simplemachines.org/community/index.php?topic=424461.0

My first SMF theme. Updated  for SMF 2.0.9

Hope you guys like it ;)

Use the themes installer!

Download: [LINK]
Code: [Select]
http://visualpulse.net/forums/index.php?action=dlattach;topic=48.0;attach=141
Download from SMF: http://custom.simplemachines.org/themes/index.php?lemma=2343

RECENT TOPICS MOD::

If you have installed this theme you probably have seen the empty recent topics block. If you want that filled and working properly please follow the instructions below. NOTE: we can not add it to the theme since it calls the database.

FIND:  index.template.php
Code: [Select]
function ssi_recentTopics_vp_mod()
REPLACE WITH:
Code: [Select]
function ssi_recentTopics_vp_mod($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo')
FIND: index.template.php
Code: [Select]
// needs to be here... otherwise errors.
Replace with:
Code: [Select]
global $context, $settings, $scripturl, $txt, $db_prefix, $user_info;
global $modSettings, $smcFunc;

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : (is_array($exclude_boards) ? $exclude_boards : array($exclude_boards));

// Only some boards?.
if (is_array($include_boards) || (int) $include_boards === $include_boards)
{
$include_boards = is_array($include_boards) ? $include_boards : array($include_boards);
}
elseif ($include_boards != null)
{
$output_method = $include_boards;
$include_boards = array();
}

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('substring', '
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, b.name AS board_name, t.num_replies, t.num_views,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from') . ', SUBSTRING(m.body, 1, 384) AS body, m.smileys_enabled, m.icon
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' : '') . '
WHERE t.id_last_msg >= {int:min_message_id}
' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})') . '
' . (empty($include_boards) ? '' : '
AND b.id_board IN ({array_int:include_boards})') . '
AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND m.approved = {int:is_approved}' : '') . '
ORDER BY t.id_last_msg DESC
LIMIT ' . $num_recent,
array(
'current_member' => $user_info['id'],
'include_boards' => empty($include_boards) ? '' : $include_boards,
'exclude_boards' => empty($exclude_boards) ? '' : $exclude_boards,
'min_message_id' => $modSettings['maxMsgID'] - 35 * min($num_recent, 5),
'is_approved' => 1,
)
);
$posts = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['board_name'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['board_name'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a class="banner_area_recent_topics_topic_poster" href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'replies' => $row['num_replies'],
'views' => $row['num_views'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new" rel="nofollow">' . $row['subject'] . '</a>',
// Retained for compatibility - is technically incorrect!
'new' => !empty($row['is_read']),
'is_new' => empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" />',
);
}
$smcFunc['db_free_result']($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table recent_topics_ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td valign="top">
<div class="banner_area_recent_topics_topic_title"><a class="banner_area_recent_topics_topic_title" href="', $post['href'], '">', $post['subject'], '</a></div>
', !$post['is_new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new" rel="nofollow"><img src="' . $settings['lang_images_url'] . '/new.gif" alt="' . $txt['new'] . '" /></a>', '
</td>
<td align="right" nowrap="nowrap" class="banner_area_recent_topics_time">
&nbsp<small>', $txt['by'], ' ', $post['poster']['link'], '</small>
<small>', $post['time'], '</small>
</td>
</tr>';
echo '
</table>';

echo '
<center>
<div class="recent_posts_link_banner_area">
<a href="', $scripturl ,'?action=recent"><small>::ALL RECENT POSTS::</small></a>
</div>
</center>
';

Preview:


<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
5
Reputation: 
1
Posted: March 1, 2011, 4:49 PM
  • Group: Member
I posted up on the smf forum about needing help on how to edit the menu section.

Oh and really nice theme  :)

Posts: 
400
Reputation: 
20
Posted: March 2, 2011, 3:11 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
I posted up on the smf forum about needing help on how to edit the menu section.

Oh and really nice theme  :)

Thanks  ;D

Post your questions here: http://visualpulse.net/forums/index.php?board=6.0

To edit the menu just go into the index.template.php and find:
Code: [Select]
function vp_nav_bar()
In that function you will find an array called $vp_nav_bar_items. All of the nav bar items are in that array. If you need to edit the text you can just hardcode it in which just means write it out and remove the $txt variables or go into the index.english.php and find the text strings to edit.

If you need further help please post in the board i specified above..
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
5
Reputation: 
1
Posted: March 2, 2011, 4:16 AM
  • Group: Member
Thanks for the reply.

Will give it a try but no doubt expect another post  ;D
Posts: 
62
Reputation: 
9
Posted: March 7, 2011, 12:05 PM  -- Last Edit: March 7, 2011, 12:07 PM by agent47
  • Group: Member
Is there anyway I can get a fix to get it working for SMF RC3 bro?
I'm so in love with this theme. Man! I can so tell that you guys are gonna become popular in no time. So waiting for what you guys have to offer. Great stuff, it's just too frikkin visually stunning for my eyes to handle.

Here's the error that I got.
Code: [Select]
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in .../Themes/default/Compat.template.php on line 32
23: if (empty($buttons))
24: return;
25:
26: // Make the last one, as easy as possible.
27: $buttons[count($buttons) - 1] = str_replace('<span>', '<span class="last">', $buttons[count($buttons) - 1]);
28:
29: echo '
30: <div class="buttonlist', $direction != 'top' ? '_bottom' : '', '"', (empty($buttons) ? ' style="display: none;"' : ''), (!empty($strip_options['id']) ? ' id="' . $strip_options['id'] . '"': ''), '>
31: <ul class="reset clearfix">
32: implode('', $buttons), '
33: </ul>
34: </div>;
35: }
36:
Posts: 
400
Reputation: 
20
Posted: March 8, 2011, 3:08 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
Ummm not sure what you did but just...

  • Download the theme...
  • Unzip
  • Edit the theme_info.xml as the following.
FIND:
[/list]
Code: [Select]
<version>2.0 RC5</version>
REPLACE:
Code: [Select]
<version>2.0 RC3</version>
  • Zip it back up (the same way). DO NOT PUT IT ALL IN A FOLDER AND ZIP THAT!
  • Install the theme just like how you would any way else.
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
62
Reputation: 
9
Posted: March 8, 2011, 5:22 AM
  • Group: Member
That's didn't seem to be the issue sir. Still getting the same error?
Posts: 
400
Reputation: 
20
Posted: March 8, 2011, 5:33 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
That's didn't seem to be the issue sir. Still getting the same error?

umm  it is not my theme giving you that error.

It is some file you put in the default theme folder called Compat.template.php


BUT ----------------

I think you forgot a '

FIND: (the last </div>)
Code: [Select]
     </div>;
}

REPLACE:
Code: [Select]
     </div>';
}
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
62
Reputation: 
9
Posted: March 8, 2011, 5:57 AM
  • Group: Member
I have no idea where that compat.template file came from and why is your theme using that file BTW? :/

Here's a paste of complat.template.php. Please take a look at it sir: http://pastebin.com/8jX7Fiau
Seems ok to me.....
Posts: 
400
Reputation: 
20
Posted: March 8, 2011, 8:26 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
My theme doesn't use it at all and didn't put it there....

Sorry but have no idea at this point.. Try just removing the file? I think it does something though. One of your mods may have messed it up...
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
2
Reputation: 
0
Posted: March 8, 2011, 2:37 PM
  • Group: Member
Hello.

Can you please remove this (the menu) :



Theme is great, but i don't need the menu.I don't know php/html good to do it by self.

p.s. Sorry if i posted in wrong section, i didn't know were to post. :(

Pozdrav iz Srbije,Greetings from Serbia ! :)
Posts: 
62
Reputation: 
9
Posted: March 8, 2011, 4:04 PM
  • Group: Member
Apparently the issue I was persisiting was SMF related and is a RC3 bug. Anyways I thought I'll share the fix here incase anyone else comes across the error:

Code: [Select]
31:          <ul class="reset clearfix">
32:             implode('', $buttons), '
33:          </ul>

Replace with:
Code: [Select]
31:          <ul class="reset clearfix">
32:             ' , implode('', $buttons), '
33:          </ul>
Posts: 
62
Reputation: 
9
Posted: March 8, 2011, 6:14 PM
  • Group: Member
So now that I managed to get the theme working, I'm having another issue now. Please provide me with a fix so that I can keep the theme permanently.

Here's the error
Code: [Select]
Fatal error: Call to undefined function call_integration_hook() in /home/super849/public_html/Sources/Load.php(2415) : eval()'d code on line 162
Here's a Pastebin of Load.php. Please take a look at it sir.
http://pastebin.com/qsxiLegj
Posts: 
62
Reputation: 
9
Posted: March 9, 2011, 12:23 AM
  • Group: Member
I posted this issue on the SMF support forums and they tell me it's because this theme was built for SMF RC5. Would you be kind enough to write it for RC3 as there are still RC3 users out there you know.

http://www.simplemachines.org/community/index.php?topic=425393.0
Posts: 
400
Reputation: 
20
Posted: March 9, 2011, 3:13 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
@dash123

NO DROP DOWN MENU
Tell me if this works: (back up your file)
http://www.mediafire.com/?c75mt4xu71qzhqc
<3 Nerve, Sk8, Labradoodle, Austin
anything