SimplePortal

Customization => Custom Coding => Topic started by: ccs1676 on December 07, 2011, 08:56:23 PM

Title: First post!
Post by: ccs1676 on December 07, 2011, 08:56:23 PM
Hey guys this is my first post! Back in 2002 I started a caving site which used phpbb. I used a portal (now I can't remember the name of it) which was cool. It did not use a template system. Rather, it was one huge php file with all the html within it. Then I moved on to ezportal, etc...Wow, that was so long ago, almost 10 years! Anywho, I'm back in the forum/website game and came across SMF and the simple portal. Works great!! Thanks!

I want to add a couple drop down menus to my portal in certain places and not quite sure how to proceed (haven't coded in a while):

(http://c76.me/glokulheader.jpg)

The first drop down menu would be when you hover over "Forum" in the top menu, which would give you direct links to each forum.

The second would be on my recent topics block. This would be a drop down box which would take you directly to the editing screen for a new post in that forum. What files would I need to edit to make this happen? Thanks!! (Sorry if posted in wrong board...)

Chris



Title: Re: First post!
Post by: Fog on December 07, 2011, 09:27:48 PM
Interesting Idea...I could use something like this on my site.

A drop down menu within a catbg or titlebg...can it be done?

Would you have a default version that would show X amount of recent topics from any forum and then you would use the drop down menu to refine the topic to the board/forum of your choice?
Title: Re: First post!
Post by: ccs1676 on December 07, 2011, 11:30:12 PM
Interesting Idea...I could use something like this on my site.

A drop down menu within a catbg or titlebg...can it be done?

Would you have a default version that would show X amount of recent topics from any forum and then you would use the drop down menu to refine the topic to the board/forum of your choice?

It should be no problem, I think those are simply <td> or <th> tags?

Right, my recent topics block displays the latest posts within any forum. The drop down menu at the top would simply let a user start a new topic within the forum they chose. It does no refining. They are basically links.
Title: Re: First post!
Post by: ARG on December 08, 2011, 12:22:46 AM
The first part would be simple. I am not sure if it would work for categories but you can surly add any topic to the dropdown just as you would anything else. This can all be done in the SMF Sources/Subs.php file.

Not sure about the second part.

 ;)
Title: Re: First post!
Post by: ccs1676 on December 08, 2011, 06:51:22 PM
Well I figured out how to add a dropdown menu to the "Forum" link. Now just figuring out what file to modify to add the "Start New Topic" dropdown :)
Title: Re: First post!
Post by: ccs1676 on December 08, 2011, 08:05:09 PM
OK, problem solved. I just added a custom html block for the direct link to a new topic, on the left side. You can also see my forum dropdown menu.  Figured that was a lot easier. See the pic. Now, I have an actual custom php coding question. As you can see from my photoshop mock up, for my recent topics block, how would I change the post date from mm/dd/yy format to 5 seconds ago, 10 minutes ago, 23 days ago, etc.

(http://c76.me/portal.jpg)
Title: Re: First post!
Post by: keith021773 on December 15, 2011, 12:35:10 PM
Great idea!!!

Please share the code for the Start New Topic Block.   I looked on here but didn't see it.

Also, if I am understanding what you are talking about with the dropdown menu.  Are you wanting something like Last 10 posts in a dropdown menu on the title bar?   If so, that's a GREAT idea as well!  I love both ideas.
Title: Re: First post!
Post by: ccs1676 on December 15, 2011, 01:52:12 PM
Put the following in a custom html block:

Code: [Select]
<form action="../">
<select onchange="window.open(this.options[this.selectedIndex].value,'_top')">
    <option value="">Start new topic...</option>
    <option value="http://yoursite.com/index.php?action=post;board=2.0">Forum 1</option>
    <option value="http://yoursite.com/index.php?action=post;board=4.0">Forum 2</option>
    <option value="http://yoursite.com/index.php?action=post;board=3.0">Forum 3</option>
<option value="http://yoursite.com/index.php?action=post;board=5.0">Forum 4</option>
</select>
</form>

And then change the necessary info.  I will have to look at index.php when I get home. That is what I edited to make the dropdown menu under the Forum link. Those are simply direct links to those forum indexes.
Title: Re: First post!
Post by: keith021773 on December 15, 2011, 04:47:38 PM
Works like a charm man.   Thanks!   Hopefully this will simplify the posting of a new topic.  Maybe more members will post now.   

And if you get the recent posts thing working, please share that one as well.   That would be fantastic!
Title: Re: First post!
Post by: ccs1676 on December 15, 2011, 06:09:48 PM
Works like a charm man.   Thanks!   Hopefully this will simplify the posting of a new topic.  Maybe more members will post now.   

And if you get the recent posts thing working, please share that one as well.   That would be fantastic!

Cool, glad you like it! The recent posts mod that you are referring to....I was trying to see if I could get the "Start new topic" dropdown you just used into the header of the recent topics block. But I just made a whole new block for it instead. Hope that clears it up?
Title: Re: First post!
Post by: keith021773 on December 15, 2011, 06:47:58 PM
That does.   Sorry I was confused alittle bit over it.    And what I wanted was the last 10 posts in a..    well, you know how the new menus work in SMF 2.0.   You hover over let's say forum, and a new list appears?   I wanted a menu button called Recent Posts and when you hover over it the last 10 posts are there.

Hope that makes sense.
Title: Re: First post!
Post by: ccs1676 on December 15, 2011, 07:00:05 PM
It does. Unfortunately, I don't know how to do that, unless I knew php!!
Title: Re: First post!
Post by: keith021773 on December 15, 2011, 09:33:01 PM
I might just drop a hint over at SMF.   :)
Title: Re: First post!
Post by: Fog on December 15, 2011, 11:10:57 PM
That does.   Sorry I was confused alittle bit over it.    And what I wanted was the last 10 posts in a..    well, you know how the new menus work in SMF 2.0.   You hover over let's say forum, and a new list appears?   I wanted a menu button called Recent Posts and when you hover over it the last 10 posts are there.

Hope that makes sense.

Recent Posts is something that SMF would support, I think.

I would work with the INFO Center PHP and CSS to see how one could do an hover titlebg css

My idea would be if you could create a block that is showing recent posts, such as you see in the info center. If one could have a drop down menu within the titlebg that you can click on to show recent posts within a selected board.

If that makes sense...
Title: Re: First post!
Post by: keith021773 on December 16, 2011, 09:35:54 AM
It does makes sense.   I think that's a good idea.
Title: Re: First post!
Post by: andy on December 16, 2011, 10:29:19 AM
I manage an outdoor club in Japan - SMF is the best I can find for managing group events like this, and SP is better than  most portals I think - you made good choices. We also have some caving events...

http://outdoorclubjapan.com/ (http://outdoorclubjapan.com/)


Menus are a big pain in SMF and portals. There are mods on the smf site to add a few custom links to the main menu but becoming outdated. Maybe the next version of Simple Portal will have a menu manager if lucky!

I don't want to seem as promoting commercial sites but I use  Bloc SMF themes which have a simple menu manager - take a look at out site - many custom drop down menus and easy to set up. Probably only theme club members get this but worth it. Until a better management system for menus comes out this is a great alternative.




SimplePortal 2.3.8 © 2008-2024, SimplePortal