Support ⇒ Themes ⇒ Opinions on modified viewtopic template ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexThemes

Opinions on modified viewtopic template Reply to topic

Go to page Previous 1, 2, 3, 4 Next

Continuation of last post. I forgot to mention a few important things.

You need to add this code to your style.css file:

.anylinkcss{ position:absolute; visibility: hidden; border:1px solid black; border-bottom-width: 0; font:normal 10px Verdana; line-height: 18px; z-index: 100; background-color: #FFFFFF; width: 200px; } .anylinkcss a{ width: 100%; display: block; text-indent: 1px; border-bottom: 1px solid black; padding: 1px 0; text-decoration: none; font-weight: bold; text-indent: 1px; } .anylinkcss a:hover{ /*hover background color*/ background-color: black; color: white; }

And if you don't want the user icons showing up anymore, which I'm sure you wouldn't even want to try the dropdown if you did not, make sure and delete this code out of /template/forumspro/posts_list.html

Find and take out this portion of script starting around line 328.

<!-- BEGIN user_details --> <a href="{post.user_details.U_LINK}" title="{post.user_details.L_TITLE}" <!-- IF post.user_details.B_TARGET -->target="_blank" <!-- ENDIF -->><img src="{S_THEME_PATH}/images/forumspro/{S_LANGUAGE}/user/{post.user_details.U_IMAGE}.gif" alt="{post.user_details.L_TITLE}" title="{post.user_details.L_TITLE}" border="0" /></a><!-- IF post.user_details.B_IMAGE_2 --><a href="{post.user_details.U_LINK_2}" title="{post.user_details.L_TITLE_2}" <!-- IF post.user_details.B_TARGET_2 -->target="_blank" <!-- ENDIF -->><img src="{S_THEME_PATH}/images/forumspro/{S_LANGUAGE}/user/{post.user_details.U_IMAGE_2}.gif" alt="{post.user_details.L_TITLE_2}" title="{post.user_details.L_TITLE_2}" border="0" /></a><!-- ENDIF --> <!-- END user_details -->

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Congrats! You really kept hammering at this one! Smile

Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.27-grsec/Apache 2.2.11/MySQL 5.0.67-community-log/PHP 5.2.8/DF 9.2.1


Thanks mate...wish it were pie with the regular community forums, but unfortunately, my original idea of simply changing a few paths isn't working as easily as it did for forumspro2

Perhaps I will just post my code over at Myndworx for those guys...sorry bout not being able to come up with some for the regular forums, I'm sure it's not too different, but I just don't have reason to come up with it on my own, perhaps one of these other guys' CSS menu will work better for all forums simply because each link will be pre-written.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Well the issue with my css menu is that it's not clickable. It just displays data. Sad Glad you got it working even with js though.

Since this feature is template only it could be a great addition to a theme. One problem with js is that it usually breaks fairly quickly with a browser update like IE6 to IE7. Unless you stay on top of updating it every year or so then it won't be much use to do it. My point being that I've seen so many themes out there with embedded js features that are now broken and make the theme features useless... yet people want me to port the theme and fix it. So what you do now could be a headache for a theme porter down the road. Not much of a negative I know, just saying.

Smile Nice job, congrats.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.4/4.3.11


Am I out of the loop with CSS completley or something? Last time I was working with CSS drop down menus, you still needed a JS file, albeit a tiny simple one that probably would not break in years, but you still needed one.

Am I missing something? Smile

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Am I missing something?


Nope, that's what this is: dragonflycms.org/cvs/h....htc?v=1.3

Diagon Alley - Top Design

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.37/4.1.21-standard/4.4.4/9.1.1


ohhh bloody heck, didn't even see that laying around...Just built a <ul><li> CSS drop menu and thought I was hot stuff! lol

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Well, I take it that .htc will never be included in any core files as it says it is only there to help someone if they want it. And if they do include it, I'm sure they will use it for a similar purpose and it doesn't matter if you made your own drop down menu anyway. So, you could just use your own little small .js file instead of using the .htc file I guess

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Well, here is a CSS driven menu with a tiny .js file to include that works with the regular 9.1.2.1 Community Forums. Thank you Sarah for pointing out the .htc file, but this method here I sa bit better then using .htc. The link in the next paragraph has a good section on why.

This menu is based off the great work by Suckerfish. This menu is using the Son of Suckerfish. You can find more great stuff by them HERE

Here is the tiny .js file. The code is here, but you will find it as an attachment for download below. Go ahead and put the dropmenu.js file in your /includes/javascript folder.

sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover);

Now, in the /template/forum/view_topic.html, you will want to put this at the top of it.

<script type="text/javascript" src="includes/javascript/dropmenu.js"> </script>

And down around line 79, you will want to replace this:

<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>

With this:

<td valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a> <ul id="nav"> <li><a href="#"><b>{postrow.POSTER_NAME}</b></a> <ul> <!-- BEGIN user_details --> <!-- IF postrow.user_details.TARGET --> <li><a href="{postrow.user_details.URL}" target="{postrow.user_details.TARGET}">{postrow.user_details.TITLE}</a> <!-- ELSE --> <a href="{postrow.user_details.URL}">{postrow.user_details.TITLE}</a> <!-- ENDIF --> </li> <!-- END user_details --> </ul> </li> </ul> </span> <br /> <span class="postdetails">{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>

You can take out the profile/messenger/etc icons if you want by taking out these lines around line 162 :

<!-- BEGIN user_details --> <!-- IF postrow.user_details.TARGET --> <a href="{postrow.user_details.URL}" target="{postrow.user_details.TARGET}"><img src="{postrow.user_details.IMG}" alt="{postrow.user_details.TITLE}" title="{postrow.user_details.TITLE}" border="0" /></a> <!-- ELSE --> <a href="{postrow.user_details.URL}"><img src="{postrow.user_details.IMG}" alt="{postrow.user_details.TITLE}" title="{postrow.user_details.TITLE}" border="0" /></a> <!-- ENDIF --> <!-- END user_details -->

Last but not least, we have the .css file additions. Go ahead and add this to your style.css file:

/** CSS Drop Down Menu **/ #nav, #nav ul { padding: 0; margin: 0; list-style: none; } #nav a { display: block; width: 10em; } #nav li { float: left; width: 10em; } #nav li ul { position: absolute; width: 10em; left: -999em; } #nav li:hover ul { left: auto; } #nav li:hover ul, #nav li.sfhover ul { left: auto; } /* Fix for IE 7 */ #nav li:hover, #nav li.hover { position: static; } /** End of CSS Drop Menu **/

That will auto populate the list with the fields that the user had filled in with their profile. As it stands right now, you will just get text links. No background, no colors, just basic stuff that is functional in IE, Opera, Firefox and Safari. You will have to tweak the CSS yourself to get your desired effect. I will most likely do the CSS tweaks later, and I’ll post them up if anybody cares. Let me know if I screwed something up or I missed something.
Attachment: dropmenu.zip
Description
Filename dropmenu.zip
Filesize 353 B
Downloaded 70 Time(s)
You are not allowed to view/download this attachment

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Yeah you can build a completely CSS driven dropdown menu with NO css. It's very tricky and will take a lot of css classes but it's possible. I haven't paid any attention to my css dropdown for a while because I've moved onto other projects.

I would like to use whatever you come up with regardless if it has js or not though. CSS would be nice but for now DF core forums needs something to clean it up and what you've come up with will fit the bill for now in my opinion. They can always go back into it down the road to build a pure css version.

I've long sinced stopped holding my breath for them to include something good that I or anyone else wants to contribute to the core. You might do all this work to find out that they will consider it a hack and you can continue to update your hack well into the future. Just FYI not to expect anything from this as far as inclusion. Neutral

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.4/4.3.11


grr no editing in this forum. god i HATE that. i meant to say
"Yeah you can build a completely CSS driven dropdown menu with NO js". Accidentally said css there instead of js.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.4/4.3.11


Well, I don't know which one I like better. The second one I posted is for the normal forums, and the first one is for forumspro2. Both have relatively small .js files and both are controlled graphically through CSS. I will have to play around with both, I'm pretty sure I could cut the second one for forumspro2, that shouldn't be a problem. And for some reason I am leaning towards that one because of how simple the changes to the template file is. Just using the standard unordered list.

Don't get me wrong, after all that, I will start a new thread here so people can search for it and find the code, but I am not going to package it and put it up for download...as it is somewhat of a hack (even though its just templating).

Regardless, it's small enough and simple enough if you can edit html files and upload to a server so people should be able to udnerstand what is going on. Therefore, they should be able to update their own stuff.

Appreciate the feedback and help.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Think the second one is the best. The .js file is all about working with the 4 major browsers for now. And it's flat out a simple .js file that gets the job done. When I change it for ForumsPro2, guess I'll just post the code for both of them in another thread so people can find it.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]


Can you please make a separate post with aptly named title with which one you think will do best for theme designers? I'll test it out when you think it's ready and if I think it will do well it will be added to TCD's Dragonfly Trickin forum. Smile

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.4/4.3.11


Sounds great Devon, not gonna be put together till tomorrow at some point. Going to get the CSS menu all pretty looking first, and making sure what I post is right.

I need to hurry up and finish my dang site for my guild. Keep sidetracking my stuff with far more interesting things then graphics.

By going with right side blocks only and moving the infobox to the header, i hope to create a nice sense of cohesion to the page. Try as much as I can to get away from the 3 column thing. Was going for XSport but more seamless...see if THATS even possible with just templating. heh

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux | Apache[1.3.37] (Unix) | MySQL[4.1.21] | PHP[4.4.5] | DF[9.1.2.1]

All times are UTC
Go to page Previous 1, 2, 3, 4 Next


Jump to: