Hi all..
First I'm sorry if my English bad cause is not my native language.
I'm curious can XThreads make custom front page for my forum? I want to change my default portal of my forum.
I'm tried using Page Manager plugin, but it was confusing me a lot cause I'm very new about PHP. So, to explain my concept I attach my design. My design is like on the attachment picture.
This is my concept:
1. For the announcement table, I want to show only thread title from specify forum. So, If I post new thread from specify forum, it automatically show there.
2. I Want to show 10 new threads on all forum and 10 new posts also automatically. But, can I make long title of thread to be shorten?
3. Can I automatically show 5 - 8 new threads from specify subforum. I've plan to make sports forum, so I wanna show 5 - 8 new threads from Football, Formula 1, Moto Gp, etc
for the rest, I think I can figure it from HTML.
Thanks for the responses...
XThreads is designed to extend threads, not create custom pages like that.
Also be aware that XThreads was designed to be more confusing than Page Manager.
(04-09-2012 05:56 PM)ZiNgA BuRgA Wrote: [ -> ]XThreads is designed to extend threads, not create custom pages like that.
Also be aware that XThreads was designed to be more confusing than Page Manager.
Really?
But honestly this plugin is so powerful.
I look at RateU site on
http://www.14.mynie.co.cc/
did he/she make that page with XThreads?
I want to make similar like that
Can I know where exactly I can find tutorial to make a page like that
Anyway, thanks for your fast response
Yeah,as @Yumi said,XThreads isn't made for custom pages,but for custom threads.
That site
http://www.14.mynie.co.cc is made with XThreads plugin & there are tutorial links on every pages.
But,if You meant for its index page,I think it is made with custom index template.
Because You have installed Page Manager plugin,I assume You use it & know about its htaccess rules to make the default index for Your forum.
- Make new page.
- Don't use MyBB template.
- Fill its content with this:
PHP Code:
<?php
define("IN_MYBB", 1);
require_once("./global.php");
global $headerinclude, $header, $theme, $footer;
add_breadcrumb($pages['name']);
$template = '
<html>
<head>
<title>' . $pages['name'] . '</title>
{$headerinclude}
</head>
<body>
{$header}
';
$template .= '
<table border="3px" width="100%"><tr>
<td width="25%"><strong>Announcement</strong></td>
<td width="75%">
';
$annoid = 2; $annolimit = 1; $annoquery = $db->query("SELECT * FROM " . TABLE_PREFIX . "threads WHERE fid='$annoid' ORDER BY `tid` DESC LIMIT $annolimit"); while ($annofetch = $db->fetch_array($annoquery)) {
$template .= '<a href="./showthread.php?tid=' . $annofetch['tid'] . '">' . $annofetch['subject'] . '</a><br />';
}
$template .= '
</td>
</tr></table><br />
';
$template .= '
<table border="0px" width="100%"><tr>
<td><table border="3px" width="100%">
<tr><td><strong>Latest Threads</strong></td></tr>
<tr><td>
';
$lastlimit = 5; $lastquery = $db->query("SELECT * FROM " . TABLE_PREFIX . "threads ORDER BY `tid` DESC LIMIT $lastlimit"); while ($lastfetch = $db->fetch_array($lastquery)) {
$template .= '
<ul style="list-style: none;">
<li style="list-style: none;"><a href="./showthread.php?tid=' . $lastfetch['tid'] . '">' . $lastfetch['subject'] . '</a><br /></li>
</ul>
';
}
$template .= '
</td></tr>
</table></td>
';
$template .= '
<td><table border="3px" width="100%">
<tr><td><strong>Specify Forum</strong></td></tr>
<tr><td>
';
$f4id = 4; $f4limit = 5; $f4query = $db->query("SELECT * FROM " . TABLE_PREFIX . "threads WHERE fid='$f4id' ORDER BY `tid` DESC LIMIT $f4limit"); while ($f4fetch = $db->fetch_array($f4query)) {
$template .= '
<ul style="list-style: none;">
<li style="list-style: none;"><a href="./showthread.php?tid=' . $f4fetch['tid'] . '">' . $f4fetch['subject'] . '</a><br /></li>
</ul>
';
}
$template .= '
</td></tr>
</table></td>
</tr></table><br />
';
$template .= '
<br />
{$footer}
</body>
</html>
';
$template = str_replace("\'", "'", addslashes($template));
eval("\$page = \"" . $template . "\";");
output_page($page);
?>
|
- Except those 2,fill the other fields up to You.
That script is only for sample.
You can learn & modify it.
Be creative.
The table tag for easy to learn (beginner). If You can use div tag,use it.
Furthermore,table tag is ancient/old way to make a web page.
(04-09-2012 05:37 PM)lenkbreak Wrote: [ -> ]This is my concept:
1. For the announcement table, I want to show only thread title from specify forum. So, If I post new thread from specify forum, it automatically show there.
2. I Want to show 10 new threads on all forum and 10 new posts also automatically. But, can I make long title of thread to be shorten?
3. Can I automatically show 5 - 8 new threads from specify subforum. I've plan to make sports forum, so I wanna show 5 - 8 new threads from Football, Formula 1, Moto Gp, etc
Most of them is just an usual plugin?
(04-09-2012 06:39 PM)lenkbreak Wrote: [ -> ]Really? But honestly this plugin is so powerful.
Who said that XThreads is not a powerful tool?
What Yumi/ZiNgA means is, the main purpose of XThreads is not for creating a custom page.
(04-09-2012 06:39 PM)lenkbreak Wrote: [ -> ]I look at RateU site on http://www.14.mynie.co.cc/
did he/she make that page with XThreads?
Of course I use XThreads there
I use the original MyBB index.php file. No core file edit at all there.
I use some plugins to load XThreads contents to my index page (you'll find most of them in this forum).
(04-09-2012 06:39 PM)lenkbreak Wrote: [ -> ]Can I know where exactly I can find tutorial to make a page like that
Unfortunately, no.
I don't know what tutorial I should create for it?
The contents of my index template is just some variables?
But feel free to ask. If I can help you, I will try to help
(04-10-2012 03:12 AM)adisp007 Wrote: [ -> ]The table tag for easy to learn (beginner). If You can use div tag,use it.
Furthermore,table tag is ancient/old way to make a web page.
Personally, I love a table tags
@adisp007
Thanks a lot!!! in my language is Terimakasih!!
I will try your advice
I hope this not confusing me
@rateu
I want to make a page similar like yours
this is what I made before (only html codes)
I'm not using Page Manager plugin for this sample
I made an index page and new template in global template.
my forum url is
http://lenkbreak.host56.com/forum/
and I want to make an index page at
http://lenkbreak.host56.com/ similar like yours
like you said, you use some plugin to load XThread contents to your index page
can I know what plugin is it?
I'm apologize about my misunderstanding about this plugin
but, If you can give me few step to make an index page like my concept, I'm really really appreciate that
Oh, I thought you want to load XThreads contents to your forum index.
If you want to load just the latest threads/posts title only, maybe you can find that kinds of plugins in MyBB Community. Or maybe you can start with the code given by adisp007.
(04-11-2012 03:09 AM)adisp007 Wrote: [ -> ]Oh,because it's easy?
Easy? Unfortunately, it's hard for me (I'm not a designer).
(04-11-2012 03:09 AM)adisp007 Wrote: [ -> ]Maybe some of them:
- PHP In Templates http://mybbhacks.zingaburga.com/showthread.php?tid=260
- Thread Tooltip http://mybbhacks.zingaburga.com/showthread.php?tid=267
PHP In Templates: I'm a fans of PHP In Templates plugin. The plugin is installed in all of "my" forums (actually it's funny for me for installing the plugin, because I have a zero knowledge about PHP).
Thread Tooltip: If all of the fields of the threads table loaded, Thread Tooltip gives me the snippet of a thread. So I don't need to load an additional query to get the post snippet.
The other plugins I use to load XThreads contents:
http://mybbhacks.zingaburga.com/showthread.php?tid=474
http://mybbhacks.zingaburga.com/showthread.php?tid=486
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=292&pid=94
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=286&pid=1047
But if lenkbreak installs the plugins (the plugins I use to load XThreads contents) in his forum, it will gives some errors because he doesn't have XThreads applications in his forum.
So, the backbone of the demo forum is XThreads. We only need to create a simple plugin to load XThreads contents to other pages (the hard things will be done by XThreads). Not only index or portal, we can load it to user profile page:
http://www.14.mynie.co.cc/member.php?act...http://www.14.mynie.co.cc/member.php?action=pro
Or, we can manipulate our showthread/postbit into a static or dynamic pages (not recommended):
http://www.14.mynie.co.cc/showthread.php?tid=167 (static)
http://www.14.mynie.co.cc/showthread.php?tid=296 (static)
Medal Owner (dynamic):
http://www.14.mynie.co.cc/showthread.php?tid=297
http://www.14.mynie.co.cc/showthread.php?tid=298
http://www.14.mynie.co.cc/showthread.php?tid=299
http://www.14.mynie.co.cc/showthread.php?tid=300
XThreads.... really, it's a powerful tool. Unfortunately, I only know a very basic usage of it
@adisp007
aha..!! I've been thinking your Indonesian too from your username
Terimakasih sangat bro! Perhaps I will ask you some more questions about mybb directly and I hope is not bothering you.
@rateu
you know what? this is what I like from community like this!!
people like you and adisp007 share their knowledge with noobs like me and never ask to be pay
I will try your suggestions and adisp007 suggestions also after this week
thanks a lot for both of you guys!