miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /  
 

First Page News

 
 
Page  Page 5 of 8:  « Previous  1  2  3  4  5  6  7  8  Next »

Author Team
8-)
#61 | Posted: 9 Sep 2002 16:02 
Rob1
There is no necessarity to copy setup_options twice: just copy the script and template files (if you need it). If you call both copies from one script, the function convert_date will redeclare, so you need to remove it from the script you call second.

Author Rob1
Partaker
#62 | Posted: 9 Sep 2002 16:04 
That's sounds helpful. I'll give it a try later.

Author keplero
Guest
#63 | Posted: 8 Oct 2006 03:52 
Hello,
I'm having some problems installing this addon because probably I've not understood well what's inside the text file that comes with the archive. Can you write a little step-by-step guide to help newbies like me? :P

Author marsbar
Associated Member
#64 | Posted: 8 Oct 2006 21:42 
keplero, what problems are you experiencing exactly? Try to be a bit more specific so that others can better tailor their responses to your situation.

miniBB First Page News addon installation and usage - an UNOFFICIAL* guide

Step 1 Extract script files
Put addon_1stPageNews2.php in your forums' directory.
Put addon_1stpagenews2.html and addon_1stpagenews_cell2.html in your forums' templates directory.

Step 2 Setup configuration
Open addon_1stPageNews2.php in an ASCII/plain text editor; e.g. Notepad.
Locate the section marked /* Some options */ where you will find a list of parameters.
Edit the parameters and save the changes.

---
Each parameter explained:
$displayForums=array(1,2);
Here you specify in the brackets the ID numbers of the forums to be displayed on the news page. The default is set to forums 1 and 2.
When entering more than one ID, separate each ID with a comma, as shown in the default example.
To find out a forum's ID number, move your mouse over the forum's title to see the forum's URL. In the URL you will see "...forum=x". The number x is the ID of that particular forum.

$limit=10;
Here you specify the number of topics to be displayed on the news page.

$displayMethod=1;
Here you have three display options. The default is set to 1 (usual echo). If you are not sure which to choose, just experiment with each one.
Your options are:
1 for usual echo
2 for display via JavaScript
0 for keeping the content within $tplNews

$sort='topic_id DESC';
Here you specify how you want the topics on the news page to be sorted. See examples A and B below.

$post_sort=1;
Here you choose whether you want the body of the first post of each topic to be displayed on the news page.
Your options:
1 for no/don't display (the default setting.)
0 for yes/display (will slow down your miniBB)
See examples A and B below.

Example A
To display latest new TOPICS with the content of the first message under each topic, set
$sort='topic_id DESC';
$post_sort=0;

Example B
To display topics with new replies, set
$sort='topic_last_post_id DESC';
$post_sort=1;

$maxTxtLength=200;
Here you set the maximum text length (i.e. the total number of characters) for each displayed item.
The default is set to 200. For faster script execution, set to 0 (which prevents the body of the posts from displaying.)

$path='./forums/';
Here you specify either the absolute or the relative path to your forums' (root) directory - be sure to include the trailing slash.
If your forums directory resides within your web directory on the web server, the default path should work.

What do absolute paths look like? Here is an example:
/user/yourname/yourdomainname/forums/

If you are calling script from a JavaScript source, you must specify an absolute path.

$l_months='January:February:March:April:May:June:July:August:September :October:November:December';
Here the months are set out in text (as opposed to numbers), each separated by a colon. The default is in English; modify to suit other languages.

$dateFormatNews='F j, Y';
Here you specify the date format.

The default explained:
PHP date format is used here.
F = month spelled in full
j = day of month without leading zeros
Y = year in 4 digits
F j, Y -> e.g. October 9, 2006

$excludeIncludes=FALSE;
Change to TRUE only if you are including addon_1stpagenews2.php from another file that is already using miniBB functions.
---

Step 3 Upload script files
Copy all files to their corresponding folder on the web server; i.e. the PHP file goes into the forums' root directory (e.g. /forums/) and the HTML files into the forums' templates directory (e.g. /forums/templates/)
Note: upload PHP and HTML files in ASCII (text) mode.

Step 4 Implementing the first page news script
You can implement the script in several ways - pick one:
a) PHP Include
You can include the script in an existing PHP file by using the include() instruction.
Example:
<?php
include('./forums/addon_1stpagenews2.php');?>
<?>

If necessary, replace "./forums/addon_1stpagenews2.php" with the correct path to your script.

b) SSI Include
If your server supports SSI (Server Side Includes), you can include the script with following line:
<!--#include virtual="/forums/addon_1stpagenews2.php" -->
Replace "/forums/addon_1stpagenews2.php" with the correct path to your script.

c) JavaScript
Example:
<script type="text/javaScript" src="http://www.example.com/forums/addon_1stpagenews2.php">
</script>


All the best -
mb

* = I am not a miniBB developer. You act on my advice at your own risk!

Author keplero
Guest
#65 | Posted: 9 Oct 2006 04:48 
marsbar, thank you very much! My problem is including the script in a php file. First of all, I just want to have a news coloumn like that of the minibb home-page. Wich php file should I edit to achieve that result? And where in the php code I should insert the instruction:

<?php
include('./forums/addon_1stpagenews2.php');?>
<?>


Regards

Author marsbar
Associated Member
#66 | Posted: 9 Oct 2006 06:17 
Hi keplero,
The file that does the including is the file you need to edit; e.g. if you want your news items to appear on your home page, the file to edit is your home page. Then make room on your home page for the news items to show up; e.g. if you want the news items to be displayed in its own column on your home page, you just need to create the extra column. And it is in that extra column you insert the include code (i.e. paste the include file code where you want the news to appear). Hope this is clear.
- mb

Author Anonymous
Guest
#67 | Posted: 9 Oct 2006 08:50 
hi. i just intalled this addon and have no idea what is wrong but it simply doesnt work.

url is www.mywebsite.com/forum so in a addon_1stpagenews2.php i changed line
$path='http://www.mywebsite.com/forum/';

then

$displayMethod=2;

and

$displayForums=array(1,2,3,4,5,6);

i copied the file to forum/

and the rest to templates

in my website.com/index.html i added
<script type="text/javaScript" src="http://www.mywebsite.com/forum/addon_1stpagenews2.php"></script>

and there is an empty page.

so i tried to include it in php file, but then i got

Fatal error: Call to undefined function: getclforums() in /hsphere/local/home/pandha/mywebsite.com/forum/addon_1stpagenews2.php
on line 41

can sb tell me what's wrong? thanks

Author keplero
Guest
#68 | Posted: 9 Oct 2006 16:24 
if you want your news items to appear on your home page, the file to edit is your home page. Then make room on your home page for the news items to show up; e.g. if you want the news items to be displayed in its own column on your home page, you just need to create the extra column. And it is in that extra column you insert the include code (i.e. paste the include file code where you want the news to appear). Hope this is clear.

It's clear, but I don't know what is my home-page file to edit (index.php?) and how to make an extra-column to display the news just like in the miniBB home page. Can you write a little tutorial or make just an example to help me understand? Thank you another time :)

Author marsbar
Associated Member
#69 | Posted: 9 Oct 2006 22:10 
Anonymous wrote: i changed line $path='http://www.mywebsite.com/forum/';

For $path, you will need to specify the absolute full path or the full server path (NOT the URL) to the directory where your forum is located on your web server. From the information you have provided in your post, the absolute full path to your forums on your web server might look similar to this: /hsphere/local/home/pandha/mywebsite.com/forum/

Anonymous wrote: in my website.com/index.html i added
<script type="text/javaScript" src="http://www.mywebsite.com/forum/addon1stpagenews2.php"></script> and there is an empty page. so i tried to include it in php file, but then i got
Fatal error: Call to undefined function: getclforums() in /hsphere/local/home/pandha/mywebsite.com/forum/addon_1stpagenews2.php on line 41


Just fix the $path in addon_1stpagenews2.php and then try again.

--

keplero wrote: I don't know what is my home-page file to edit (index.php?)

Sorry, I do not follow you: do you mean you cannot find your site's home page?

The page you need to modify is the page where you want the news items to show up.

keplero wrote: how to make an extra-column to display the news just like in the miniBB home page. Can you write a little tutorial or make just an example to help me understand?

A course on web page design is beyond the scope of miniBB's support forums. There are lots of helpful resources online to help you learn the basics. If this do-it-yourself approach does not appeal to you, another alternative is to hire others (e.g. miniBB Team) to do the work for you.

All the best -
mb

Author keplero
Guest
#70 | Posted: 10 Oct 2006 02:31 
Sorry, I do not follow you: do you mean you cannot find your site's home page?

I use miniBB forum index as my home-page, so wich file should I modify? index.php? main_forums.html?
Thank you

Author Paul
Lead Developer 
#71 | Posted: 10 Oct 2006 03:22 
If your miniBB is already the first page - I think, you need to do nothing. Latest discussions is the same thing as shown in this addon.

Author keplero
Guest
#72 | Posted: 10 Oct 2006 04:40 
Latest discussions is the same thing as shown in this addon.

I think it is not the same thing because of the different "layout" and the fact that you can choose wich forum you want to display in the news (for example the "news" forum :P).

Author Anonymous
Guest
#73 | Posted: 10 Oct 2006 16:49 
hi Paul, thanks a lot for your help! forum works fine, and news feed as well!

Author marsbar
Associated Member
#74 | Posted: 10 Oct 2006 18:09 
keplero wrote: I use miniBB forum index as my home-page

I see - I didn't realise that, given that the First Page News addon is designed for those who need to display 'latest discussions' on non-miniBB pages on their sites. In your case, as mentioned by Paul, you do not need to use this addon because you already have "Latest discussions", which serves the same function as the addon, built into your forum's home page.

keplero wrote: the different "layout" and the fact that you can choose wich forum you want to display in the news (for example the "news" forum :P).

Generallly speaking, layout changes are done by modifying the templates and stylesheet.

It is possible to choose the forum(s) to display in the "Latest discussions" section of your miniBB home page - please refer to "Exclude last discussions" (i.e. exclude from latest discussions list) section of the official miniBB Manual for instructions.

-mb

Author keplero
Guest
#75 | Posted: 11 Oct 2006 11:40 
marsbar: It is possible to choose the forum(s) to display in the "Latest discussions" section of your miniBB home page - please refer to "Exclude last discussions" (i.e. exclude from latest discussions list) section of the official miniBB Manual for instructions.

Thank you, in effect I can achieve the same results moving the latest discussion elsewhere in the page! :)

Page  Page 5 of 8:  « Previous  1  2  3  4  5  6  7  8  Next » 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /
 First Page News
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑