News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

TinyPortal

Started by lurkalot, February 12, 2005, 04:43:00 AM

Previous topic - Next topic

bloc

Update:
Done some changes in the install/un-install routine. Now it should remove itself as expected. Also the shoutbox bug(shouts not saved) has been corrected.

Anguz

* Anguz goes grab a copy.
Cristián Lávaque http://cristianlavaque.com

Anguz

#42

  • Install/uninstall does look much better now. :)
  • Tabs are better for indentation than spaces, IMHO. You're replacing tabs with spaces, look at the following quote from your mod (highlight the leading spaces to see the difference):

<search for>
// Start the linktree off empty..
$context['linktree'] = array();
</search for>
<replace>
        // Start the linktree off empty..not quite, have to insert forum
        $context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => 'Forum - Index'));
</replace>

[li]Write comments properly, in the above example it should probably read:[/li]

// Start the linktree off empty... not quite, have to insert forum.

[li]Keep the indentation level of the code around the one you're inserting. Tabs will help you keep the indentation consistent, but in this case it's weird anyway, with the TinyPortal comment (which, BTW, is missing the period at the end) without indent and the next line with more indent than the line before your new code. Look at this from your mod:[/li]

<search for>
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
</search for>
<add after>
// TinyPortal
           require_once('SSI.php');
           loadtemplate('TPortalBlocks');
</add after>

should be

<add after>
// TinyPortal.
require_once('SSI.php');
loadtemplate('TPortalBlocks');
</add after>

[li]Make your comments unique, you use the "// TinyPortal" one in several places. I've done this mistake myself in some mods.[/li]
[/list]

Again, very well done on the mod. I love how you explore the power of the theme engine. I hope you find the feedback useful. :)

A good read to refresh some stuff:
Coding Guidelines...
Cristián Lávaque http://cristianlavaque.com

SOTG Marine

Quote from: maufonseca on February 12, 2005, 06:40:39 PM
go to TP Admin and you can chose what do you want to see in the homepage

Ok, .. neat......  I didn't see that as an option, but ok....

Now I can get articles there, but no forum, and definately no portal of any kind. What am I doing wrong?

Anguz

Missed something:


  • Wasn't the previous release 0.4? You should change the version with each release, IMHO.
  • id and version still don't match:
    Quote from: package-info.xml
            <id>bloc:tinyportal</id>
    Quote from: tinyportal.mod
    <id>
    TinyPortal
    </id>

    Quote from: package-info.xml
            <version>0.4</version>
    Quote from: tinyportal.mod
    <version>
    0.4b
    </version>

    Should probably be:
    Quote from: package-info.xml
       <id>Bloc:TinyPortal</id>
    Quote from: tinyportal.mod
    <id>
    Bloc:TinyPortal
    </id>

    Quote from: package-info.xml
       <version>0.5</version>
    Quote from: tinyportal.mod
    <version>
    0.5
    </version>
Cristián Lávaque http://cristianlavaque.com

SOTG Marine

I'm using the Helios Theme, .. and I think that's my problem. I see everything you guys are talking about on the regular theme. How do I get it to work on the Helios theme?

[Unknown]

Quote from: package-info.xml
        <id>bloc:tinyportal</id>
Quote from: tinyportal.mod
<id>
TinyPortal
</id>

Quote from: package-info.xml
        <version>0.4</version>
Quote from: tinyportal.mod
<version>
0.4b
</version>

The version number and id in the .mod file are not used, required, or even checked by the package manager.  Boardmod uses them, but the package manager doesn't.  I don't even recommend bothering with them.  This doesn't, mind you, apply to xml style mods.

-[Unknown]

Midgard

I'm using manual install ;)

Anguz

Quote from: [Unknown] on February 13, 2005, 05:24:28 AM
The version number and id in the .mod file are not used, required, or even checked by the package manager. Boardmod uses them, but the package manager doesn't. I don't even recommend bothering with them. This doesn't, mind you, apply to xml style mods.

-[Unknown]

Thanks for clarifying it. I didn't know it wasn't required in the Boardmod format as it is in the XML one. I'll probably still make them match for consistency.
Cristián Lávaque http://cristianlavaque.com

bloc

Thanks Anguz :) - and [Unknown] - I will go over the things you mentioned, especially the comments. I plan to further comment the whole mod properly, and optimize things/functions before the next release, hence the not changing version number. It was the un-install not working that was most important now.

The language files are not complete either, so that will also have to be in.

I am glad you like this mod. Codewise I have a lot to learn yet, so if you have immediate concerns about the code itself, please air them! :) Already I see some queries could be left out in certain situations etc. It should execute fast and efficient, not becoming some slow monster of an addon...(..)

Midgard

What time is update this mod?

Bloc, men, did you make a roster page?

bloc

Quote from: SOTG Marine on February 13, 2005, 05:19:44 AM
I'm using the Helios Theme, .. and I think that's my problem. I see everything you guys are talking about on the regular theme. How do I get it to work on the Helios theme?


I will convert all my themes ( well, almost..) to alternative versions for use in TinyPortal. Mainly its just adding some images, and changing index.template.php. So then you can use that version of Helios instead.

But if you already have Helios modifiled, just send me the index.template.php file and I will insert the code for you.

RGSMDNR

25. Execute Modification ./Themes/default/index.template.php Failure

???

bloc

It will need an unmodified index.template file.

Midgard

I want again a roster/leads page

bloc

You could just use the article system for that...isn't it just a overview of some sort? Or does it pull data from the database? In that case its a bit different...but I am not making something especially for that, I am sorry.

Midgard

Okay. np. I'll try it.

maufonseca

I got an idea..... I was requesting this mod, but I think it can fit TinyPortal......... Something like the mod page in this site, where members can submit their reviews of something (I have a Gaming site, and I think it can be useful) and people can commet on it and rate it  :D

codenaught

Okay, so I really like this Portal but I have a few things that I think would make it better.

More options with the collapse/expand of the left and right sides of the portal
Options such as for the admin to select if they want to have the left side collapsed by default on the forum and also an option for it to be collapsed by default on the portal. Same goes for the right side.

So it could look something like this:

Use left bar: Yes/No
Expand left bar by default on forum: Yes/No
Expand left bar by default on portal: Yes/No

The reason I want this, is because I would like for the right side to be expanded by default on the portal index but collapsed by default when viewing the forum.

Also I noticed that the theme changer for the portal doesn't keep the changed theme with it. So if I changed my theme to something else using the theme changer on the portal, once I log back in it will be showing the theme I was using before I changed the theme using the theme changer from the portal.

And also the Block permissions system doesn't seem to really work right. If I make a block appear only to a group I am in, it will show the block twice and it will still show the block to everyone else still, but the block will only come up once for those people.
Dev Consultant
Former SMF Doc Coordinator

devinshade

Hi Bloc,

Great work on the mod.  I've been getting these errors though:

Whenever I click on any of the TPAdmin settings, it automatically logs me out.  Hence I can't never get to change any of the settings.  Do you have any ideas how to fix that problem ?  Thanks.


Advertisement: