TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 310
  • Total: 310

Recent Topics module ?

Started by hashend94, October 25, 2012, 07:06:50 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Freddy


hashend94

Well I tried it on adk portal, and it seems to display 'Loading Sub Menu Contents...' the sites this --> http://supremecreamscans.com/index.php

IchBin

If you want help for another portal, don't you think you should post for help at that portal's support site? How would we know if something works on software that we do not use?

hashend94

Quote from: IchBin™ on July 15, 2013, 07:44:21 PM
If you want help for another portal, don't you think you should post for help at that portal's support site? How would we know if something works on software that we do not use?

That is why I asked if it supports other portals in the previous post, and when Freddy told me to go ahead and try out I just simply did and posted the results I got.   :-[

IchBin

Yeah, but the fact that you even originally posted here. Why would you ask us about another portal? Common sense should tell you that we don't use ADK here. So you should have just asked at ADK site. Getting help for another portal here is pretty gutsy if you ask me.

hashend94

I'm really sorry If I offended any of you by  posting that. I meant no offense  :-[ I'll make sure that won't happen again. And once again I'm really sorry.  :(

IchBin

Trying not to be offended here. Seems the last couple of topics have drudged up hard feelings. lol No worries. You start using TP, feel free to post here with all your questions. :)

Freddy

Same as Ichbin...

My comment was meant as a little dig as we only support TP here.  No offence taken.  Peace.

hashend94

I switched to TP finally, and dont plan on switching back to anything :P

hashend94

Okay, So I have a question. I used the array function to display multiple boards in one tab, and when I use that the tab doesn't seem to display anything atall. Any Idea why this happens ?

My mouseOverrTabContent.php :
<?php
// ===============================================================================================
// mouseoverTabContent.php - very simple version to just show recent topics from certain boards.
// 03 November 2012
//
// Code is based on the work of StormLrd and modifications by dimdom.
// This file pulls together their work and has been assembled by Freddy888.
//
// This file is designed to pull data from an SMF forum and put it in a Tiny Portal tabbed block.
// This uses a  modified version of the 'Mouseover Tabs Menu' at 
// http://www.dynamicdrive.com/dynamicindex1/mouseovertabs.htm
//
// Functions are prefixed 'mot_' meaning 'mouse over tab'.
// Basically each function equals one tab contents in your Tiny Portal block code.
// The order in which the functions are called is the order the tabs will appear in.
// You can put whatever you like in these functions or add more,
// this method just makes it easier to move stuff around.
//
// The actual 'output' from this file occurs at the end of this file.
// You can skip down to the bottom to fine tune things...
//
// Functions in this version :
// mot_NewTopics(BOARD-ID)
// ===============================================================================================



// ****************
// INITIALISATION..
// ****************


// The mouseover tabs JS code generates a $_GET we don't need at this point it seems.
// We need to empty the $_GET variable here otherwise SMF throws a 'Invalid request variable'.
// See circa line 99 in QueryString.php for more info. 888
$_GET = array();

// Going to need all the useful things in SSI.
require_once('../SSI.php');

// Initialise Tiny Portal.
TPortal_init();

// Work out where all the TP images are....
$tpimagesurl $boardurl '/Themes/default/images/tinyportal';
$tpimg['options'] = $tpimagesurl '/TPoptions.gif';
$tpimg['bullet4'] = '<img src="' $tpimagesurl '/TPgoto.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$tpimg['tpblue'] = $tpimagesurl '/TPblue.gif';
$tpimg['bullet1'] = '<img src="'$tpimagesurl '/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$tpimg['bullet2'] = '<img src="'$tpimagesurl '/TPdivider2.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$tpimg['bullet3'] = '<img src="' $tpimagesurl '/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$tpimg['article'] = $tpimagesurl '/TParticle.gif';




// *************
// The Functions
// *************



// Grabs recent topics in a particular board...
function mot_NewTopics($boardid)
{
global $scripturl$settings$context$txt;

$what ssi_recentTopics('5'NULL$boardid'array');

echo '
<div class="tabsmenucontent" style="padding: 5px">
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr class="catbg3">
<td valign="middle">Topic</td>
<td valign="middle">Board</td>
<td valign="middle">Writer</td>
<td valign="middle"></td>
</tr>'
;

foreach ($what as $topic)
{
echo '
<tr>
<td class="windowbg" valign="middle">'
$topic['link'];

// Is this topic new? (assuming they are logged in!)
if (!$topic['new'] && $context['user']['is_logged'])
echo '
<a href="'
$scripturl'?topic='$topic['topic'], '.from'$topic['time'], '#new"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="new" border="0" /></a>';

echo '
</td>
<td class="windowbg2" valign="middle">'
$topic['board']['link'], '</td>
<td class="windowbg2" valign="middle">'
$topic['poster']['link'], '</td>
<td class="windowbg2" valign="middle">'
;

if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
echo '
<a href="'
$topic['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="Last Post" title="Last Post" border="0" style="float: right;" /></a>';
}

echo 
'
</td>
</tr>
</table>
</div>'
;
}


/*
// An example function...don't forget to call it in the config at the bottom!

function mot_myFunction()
{
global $what $ever $you $need $here;

echo '
<div class="tabsmenucontent" style="padding: 5px">'

// All your code goes here...

echo '
</div>';
}
*/




// *************************************
// And finally output & configuration...
// *************************************

echo '
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>'
;

// Tab 1
mot_NewTopics(array(48.0,53,42,16,47,49));

// Tab 2
mot_NewTopics(array(38,40,39));

echo '
</body>
</html>
'
;
?>


My Block code:

global $boardurl;

echo '
<script type="text/javascript">
var cssNode = document.createElement("link");
cssNode.type = "text/css";
cssNode.rel = "stylesheet";
cssNode.href = "' , $boardurl , '/tabbed_block/tabbedBlockStyle.css";
cssNode.media = "screen";
cssNode.title = "dynamicLoadedSheet";
document.getElementsByTagName("head")[0].appendChild(cssNode);
</script>

<script src="tabbed_block/mouseovertabs.js" type="text/javascript">
/***********************************************
* Mouseover Tabs Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>


<div id="mytabsmenu" class="tabsmenuclass">
<ul>
<li><a href="#" rel="tab1[selected]">Latest forum posts here.</a></li>
<li><a href="#" rel="tab2">Recent Staff topics here.</a></li>
</ul>
</div>

<div id="mysubmenuarea" class="tabsmenucontentclass">
<!--1st link within submenu container should point to the external submenu contents file-->
<a href="tabbed_block/mouseoverTabContent.php" style="visibility:hidden">Sub Menu contents</a>
</div>

<script type="text/javascript">
//mouseovertabsmenu.init("tabs_container_id", "submenu_container_id", "bool_hidecontentsmouseout")
mouseovertabsmenu.init("mytabsmenu", "mysubmenuarea", false)
</script>
';

This website is proudly hosted on Crocweb Cloud Website Hosting.