Community Central
Community Central
Forums: Index Community Central Forum Trying to make a customized div template
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Archive
Note: This topic has been unedited for 4859 days. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.


Hello, can I get some help or tips on creating a template.

This is what I am trying to create (see) w:c:sandbox:Bunai82/Testing1. I am thinking it would work similar to Template:cquote2, where you have to type in between spaces and the quote box will stretch horizontally to accommodate any text. I am just not sure what to take away from the cquote2 template that would make my idea function.

For a visible example of what I am using when it comes to the raw code, see this page. I started to use this type of code because the announcement is easier to see when spaced a part, and you can see which character made the annoucement. I think it needs one more line to match the Oasis width, but that is the basic idea.

Also, will there be an issue for use a repeated template on one page? Does it effect the loading? -- Bunai82 (talk) 12:19, December 19, 2010 (UTC)

Is this what you want - Quotebox Its the cquote template with the Border style just changed from none to Solid. By changing other bits of the styling section at the top like your div example you can alter the borders look (width, colour, line type etc). If you want to make them optional replace them by input parameters to make it more versatile and update the usage & example section to tell others the options. Copy it to your wiki and give it a name to suit you (update examples and usage info to use new name within the template).
Normally templates like this can be used multiple times on a page without a problem. just add {{yourtemplatesname|quotetext=text of the quote|personquoted=person quoted|quotesource=source of quote|quotewidth=##px|quoteheight=##px}} for each instance (only using the parameters you require each time). -   BulldozerD11   talk    contribs    email   14:59, December 19, 2010 (UTC)
Thank you, what can I edit to make the boarder less thick and does removing quote blocks bother the set up? -- Bunai82 (talk) 23:13, December 19, 2010 (UTC)
BulldozerD11, I copied (and modified) your Quotebox template to w:c:templates:Template:Quotebox. I hope you don't mind. Attribution is at the top of the template page.
Bunai82, you might want to start with something simpler than that template, since it is a bit complicated and modifying it won't be real easy.
Try starting with the following wikitext:
{| align="center" style="border:solid 4px #888; padding:0.5em;"
| width="20px" valign="top" style="color:#b2b7f2; font-size:40pt; font-family:serif; font-weight:bold; text-align:left; padding:10px 10px;" | “
| valign="top" style="padding:4px 10px;" | Text of the quote
| width="20px" valign="top" style="color:#b2b7f2; font-size:40pt; font-family:serif; font-weight:bold; text-align:left; padding:10px 10px;" | ”
|-
|  
| colspan="2" valign="top" | <div style="line-height:1em;text-align: right"><cite style="font-style:normal;">— Person quoted</cite></div>
|}
which gives...
Text of the quote
 
— Person quoted
You can adjust the border width and color by changing 4px to the border width you want and #888 to the border color you want. Change #b2b7f2 to the quote mark color you want or to transparent if you want them hidden.
-- Fandyllic (talk · contr) 11:24 AM PST 20 Dec 2010
Hi Fandyllic yours looks alot simpler - 'my' template was not created by me as I just used the one that Bunai82 had linked to as I saw it had aborder in it already but set to invisible. Yes the sizeing stuff for the quotes is over complicated in it, but it was a quick fix for the problem as described originally. Now the quote marke images are not wanted yours will be easier to update. - 00:54, December 21, 2010 (UTC)
Ah okay. It looks easier to edit, but does the code work the same? {{cquote2|quotetext=text of the quote|personquoted=person quoted|quotesource=source of quote|quotewidth=##px|quoteheight=##px}} -- Bunai82 (talk) 01:43, December 21, 2010 (UTC)
My table example wikitext works slightly differently than BulldozerD11's template, but should produce very similar output. My table doesn't include a quote source, though. BulldozerD11 was doing a few strange things with the template that I didn't want to figure out. -- Fandyllic (talk · contr) 6:58 PM PST 20 Dec 2010

Small tweak

w:c:gaia:Template:Cquote3

Alright, I got the template to basically look how I want. I cut away the quotes and tried to expand the content area. What I am trying to do now is make the template function without the use of the personquoted=person quoted|quotesource=source of quote}}. When you don't include at least one in the template, the whole thing results in the "quotetext=" to become blank. -- Bunai82 (talk) 11:35, December 22, 2010 (UTC)

Bump, just to bug you guys about this one more time. Can I completely remove the quoted source and person in order to render the template a "quote text only" ? -- Bunai82 (talk) 19:11, December 26, 2010 (UTC)
It works fine for me. I see no problems. I used only the quotetext parameter, and I got exactly what I put in.  Monchoman45  Talk  Contribs  Skystone  00:59,12/27/2010 
When I tried it, the quoted text would appear blank, and would only work if I added something to the person and source. -- Bunai82 (talk) 21:31, December 28, 2010 (UTC) EDIT I think I got it to work.