drupal multiple interest of user - drupal

hi i want to refresh user page with different data but with same template (user-profile.tpl.php) by simply clicking tabs. Can any one suggest the best way to do that ?.
for ex:
tab1:sports , tab2: music tab3: literature
by clicking tabs the template is same but the data is going to refreshed.
Note: Look like profile categories but not the same. all details are from user table

I think the simplest way, which isn't exactly what you asked for, would be to using jQuery tabs or something similar to create the tabs effect. In other words get all the data but use CSS and JavaScript to handle which data should be displayed.
I don't think there is an easy way to split up the content of the user profile into tabs with pure html and Drupal.

Related

Wordpress - Display Content Conditionally

I am fairly new to Wordpress. I am writing a real estate site, and I want to have a Service Area page that displays the Counties that we serve in various states. So what I want to happen is to have a dropdown list where a user can select a state, and based on the state that they select, a text area will display that counties that we service in that state.
So basically, I want to store text content in the form of counties that will be displayed based on the conditions of a dropdown list.
I have no idea where to start. Is there a plugin that works for this kind of situation such as a form plugin that can store content, or am I going to have to write custom PHP/Javascript to make something like this happen. I am asking because this seems like a common scenario on websites, I just don't know where to look.
Thanks for any suggestions that you may have!!
So what I ended up doing was creating a select box in html that when a change happened on the list, a javascript function was called that changed the visibility of a text area and also set the value of its content to display all the counties that I needed. Ended up being much more simple than I expected. No PHP functions and short code necessary.

trouble with creating a breadcrumb in asp classic

I need advice on how to do breadcrumbs in asp classic
I have a company detail page - the thing is it could have been gotten to by a number of ways - through a area or through a list of categories and then companies
I want to show the breadcrumb that this user came to it
(and the same page can be gotten to in many ways)
I tried to build a session variable but if a user clicks the back key then it messed it up
any ideas?
When you design your site you need to work out, in your own mind (best to use a pencil and paper), just how the site links together and which pages can be considered to be related. I know this sounds pretty grey, but this is more a design principal than set in stone.
Word is a good tool to work this out. Flick into Outline View and use this to build up the structure. The arrows on the ribbon at the top left allow you to indent and outdent your structure, and the markers at the beginning of the line allow you to drag and drop sections from one place to another.
Once you're happy about the structure you can update your pages to contain the stepped breadcrumb. Unless you have heavily automated pages that change their structure vastly, or a site that is very fluid (changing it's structure frequently), I would simply hard code the breadcrumb in using an unordered list (<ul>).
It gets more complicated for Classic ASP if you want to be able to automate the breadcrumb. Firstly you'd need to decide what type of automation you want to use; for instance XML, like the .NET version, or a global.asa string/array version, or something that's read from your database... The list goes on.
If you still find it difficult to get around the user's landing page train of thought, try using the search page on a site like the NHS Data Dictionary, or even try navigating using the links on the left. The breadcrumb for this site is in the top banner - watch what happens when you switch between different links.
Hope this helps, but remember there's no right or wrong way to code up your links, it simply depends on the application or site you're creating.

WordPress - add Database driven tables

I'm just trying to move one of my old php sites to wordpress. As part of the site I have 'top tables' e.g. top 10 cars, listing their features etc. At the moment that all comes from a database and the HTML is generated from the data.
So if a car soon gets a hybrid engine I just check that in the database and my web site table updates to reflect that.
This all works fine. I just don't know where to start when trying to implement something like this in wordpress. I want to keep the WP header, footer, nav... and put my table in to the content area.
Someone recommended simply copying the current generated HTML in to a new post and editing the HTML when anything changes, this sounds like a quick solution but there must be a better way of doing this.
Ideally I would want to keep my current data input pages (and separate database) for all of this 'table data' and present the out put as a post.
If anyone can point me in the right direction (key words I should search for, a guide) that would be great.
Depending on your usecase, you'll usually want to use a static page template:
http://codex.wordpress.org/Page_Templates
Or shortcodes:
http://codex.wordpress.org/Shortcode_API

Drupal 6, giving user ability to create microsites

I built a website that allows a user to create event pages with schedules etc... But now I want to give more options which can be used to build more of a minisite or microsite. So along with the usual options of adding a gallery, description etc.. I want them to be able to add a sub menu, and a custom background. I think the background is easy. However, for the submenu I don't really want to give access to the menu options. I would like to still use nice menu though.
I would love some suggestions as to the best way of adding these features while making it really intuitive for the users. Something like a Microsite node that allows everything to be set on one page perhaps?
Have you looked at Open Atrium? http://openatrium.com/
This is a Drupal distribution that lets you create microsites.

How Can Wordpress Easily Provide A Voting and Commenting View For 5 Page Layout Possibilities?

Right now, when I create a media item, I can view it as admin by going through the Media then clicking on view, eventually I end up at [mysite]/blog/?attachment_id=31 which is a nice reduced version of the image (which can be clicked to appear large), and which has the nice feature that there is a place to leave comments at the bottom.
This is great for administrators. But I want anonymous users to be able to look at 5 different, fairly similar images, and make comments on the pages separately. So I'd like for the anonymous users who navigate to [mysite]/blog/?attachment_id=31 to find the same page the way it looks to admins.
But when going to that URL as an anonymous user instead of the image with comment form I get:
Sorry, no posts matched your criteria
So, how can I enable this permission for anonymous users?
If this is not possible, please rephrase the question as, "What is the best way to use Wordpress to get a bunch of anonymous people to vote on 5 different layouts and also to be able to comment on each of them separately, as I am trying to do at http://christian-filipina.com/blog/ ? (None of these are public URLs, please don't link to them.)
Do I need to create a page for each of those separate layouts and then use HTML to link to the variously-sized versions of the images?
When adding an image to the post make sure that "attachment page" is checked instead of "image file" This should fix your problem. See: http://codex.wordpress.org/Using_Image_and_File_Attachments

Resources