Status
Not open for further replies.

bszopi

Former Developer
Ok, I said I would do a quick tutorial on using the templating feature of vBSlider v3.0, so here goes!

First, click on the "Manage Templates" option from the vBSlider ACP menu. Here, you can create a new template. In the "Add New Template" dialog box, it asks you to enter the number of variables you want for your template. For this example, I am using 5 variables. Once I have entered 5, click on "Add New Template" button, and it brings up the template screen.

Ok, from here, you now can create your own personal template using HTML and inline CSS. First, assign a name to your template, and make it active. In the next box, you put in your custom HTML. For this example, I am using the following:

Code:
<div style="float:right; padding-right:12px; padding-bottom:12px;"><div class="table" style="background-color:#000000;">
	<div class="td" style="font-size:32px; background-color:green; padding:3px; color:#FFFFFF; vertical-align:middle;">{var1}</div>
	<div class="td">
		<div style="text-decoration:line-through; color:grey; padding:3px; vertical-align:top;">{var2}</div>
		<div style="font-size:12px; padding:3px; color:#FFFFFF; vertical-align:top;">{var3}</div>
	</div>
</div>
</div>
<div class="table" style="width:100%; clear:both; background: rgb(0, 0, 0) transparent; background: rgba(0, 0, 0, 0.6); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)';">
<div class="tr">
	<div class="td" style="padding:0px 12px;"><a href="{var6}" style="font-size:32px; color:#FFFFFF; text-decoration:none;">{var4}</a></div>
</div>
<div class="tr">
	<div class="td" style="padding:0px 12px 12px 12px; font-size:12px; color:#FFFFFF;"><a href="{var6}" style="color:#FFFFFF; text-decoration:none;">{var5}</a></div>
</div>
</div>

As the dialog text mentions, I have placed several {var X} values in the HTML. These are the areas where you can place the different variables you want to use in the template. The next areas are just areas where you can type in descriptions for the variables. Once you have that all done, click on the "Add New Template" button again to save your template.

Ok, now that you've created a template, you need to put it to use! Go to the instance manager, and click on the "Edit Custom Content" link. Once the new screen has loaded, you will see at the top the ability to create a custom content item using a template. From the dropdown, select the template that you just created and click "Add New Content". This brings up the standard custom content entry screen, but at the bottom, you have the option to enter information into the various variables you created in your template. Fill in the form, save it, and then ensure you have Custom Content Quantity greater than 0 in the instance options. Goto your slider, flip through the slides, and you will find your new custom content slide with your new template overlaying the normal slide. Here is what the above code looks like:

template_vbslider.webp

Hopefully that helps people out. Feel free to ask questions if you want further info.
 
A Few more templates would be good for those of us who don't know how to code. ;)

How would I do something like this...?

Template_Samples.webp

Does anyone know of a resource on the net to find templates?
 
It probably wouldn't be too hard to do something like that. Do you want 6 custom areas like that? Give me a few days and I should be able to come up with something close.
 
That would be Great. I was thinking 8 areas.

Like so...or something like that! :) what works best...

Template_Samples_1.webp
 
Last edited:
With the holidays and everything, its not going very good at all. Sorry. :( I should have time this next week to get something together.
 
GoodApples, I've got a decent start on your template, but I guess I need to ask what you want to have linkable? The way your example is set-up, it almost appears that each item on the left would load something on the right when clicked. Unfortunately, this wouldn't be possible with the slider. But, I can make it so that each of the 4 tabs have a variable for the tab name and a variable for the tab link, which would link to an external page. Then I'm assuming you'd want the right side transparent like your image shows to display similar text, which none of it being linked to anything? Just want to make sure I'm not heading in the wrong direction.

SteveRobWhatever, what kinds of things are you wanting to do?
 
The left doesn't need to load the right. :)
1 thru 8 tab names and a variable option to a link.
Yes, right side would be the background image with a transparent layer on the right and placed over the image with the text layer on top.

I hope that makes sense...
 
Try this code and let me know what you think:

Code:
	<div style="float:right;">
		<div class="table" style="width:150px; height:200px; background: rgb(0, 0, 0) transparent; background: rgba(0, 0, 0, 0.6); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000, endColorstr=#000000); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000, endColorstr=#000000)'">
			<div class="tr" style="font-size:32px; color:#FFFFFF; vertical-align:middle; height:50px;">
				<div class="td" style="padding:5px 5px;">{var10}</div>
			</div>
			<div class="hr" style="width:150px; height:3px; background: rgb(240, 240, 240) transparent; background: rgba(240, 240, 240, 0.6); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#f0f0f0, endColorstr=#f0f0f0); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#f0f0f0, endColorstr=#f0f0f0)'; "></div>
			<div class="tr" style="font-size:16px; color:#FFFFFF; height:147px;">
				<div class="td" style="padding:5px 5px;">{var11}</div>
			</div>
			<div class="tr" style="width:150px; height:50px; background: rgb(255, 255, 255) transparent; background: rgba(255, 255, 255, 0.6); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000, endColorstr=#000000); -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000, endColorstr=#000000)'; ">
				<div class="td" style="padding:0px 5px; line-height:50px;">{var12}</div>
			</div>
		</div>
	</div>
	<div class="table" style="width:150px; position:absolute; top:5px; height:250px;">
		<div class="tr" style="background: rgb(255, 0, 125); background: rgba(255, 0, 125, 1); height:31px;">
			<div class="td" style="padding:0px 12px;"><a href="{var6}" style="font-size:24px; color:#FFFFFF; text-decoration:none; font-weight:bold;">{var1}</a></div>
		</div>
		<div class="tr" style="background: rgb(240, 240, 240); background: rgba(240, 240, 240, 1); height:54px; border-bottom:1px solid #c6c6c6;">
			<div class="td" style="padding:0px 12px; font-size:16px; color:#000000; line-height:54px;"><a href="{var3}" style="color:#000000; text-decoration:none;">{var2}</a></div>
		</div>
		<div class="tr" style="background: rgb(240, 240, 240); background: rgba(240, 240, 240, 1); height:54px; border-bottom:1px solid #c6c6c6;">
			<div class="td" style="padding:0px 12px; font-size:16px; color:#000000; line-height:54px;"><a href="{var5}" style="color:#000000; text-decoration:none;">{var4}</a></div>
		</div>
		<div class="tr" style="background: rgb(240, 240, 240); background: rgba(240, 240, 240, 1); height:54px; border-bottom:1px solid #c6c6c6;">
			<div class="td" style="padding:0px 12px; font-size:16px; color:#000000; line-height:54px;"><a href="{var7}" style="color:#000000; text-decoration:none;">{var6}</a></div>
		</div>
		<div class="tr" style="background: rgb(240, 240, 240); background: rgba(240, 240, 240, 1); height:54px;">
			<div class="td" style="padding:0px 12px; font-size:16px; color:#000000; line-height:54px;"><a href="{var9}" style="color:#000000; text-decoration:none;">{var8}</a></div>
		</div>
	</div>

See attached screenshot for what it looks like (the background is just an example and is not included in the code).
 

Attachments

  • Capture.webp
    Capture.webp
    41.7 KB · Views: 7
Set it to 12. On the left hand side, VAR2 is the title of that tab and VAR3 is the link for that tab. Same goes for the next 3 tabs. All other areas are just the single variable.
 
Is there a way to add var ...oh just delete and start a new one...mmm this might be a feature request?

Unless it gets more interactive, whereas you could preview the template when pasting in the code, I don't really see the ability to add a variable becoming a feature, as you just figured out the easier way to do it. And actually, you don't have to delete it, just create another one and use it instead.
 
If VAR3 is the link for that tab can I place a URL = Replacement Variable Settings Title?

Var.webp
 
Last edited:
SteveRobWhatever, what kinds of things are you wanting to do?

Ideally? I don't know if it's possible. My current setup is pretty bland to start off with. I am not the best when it comes to CSS. I would love if I had a way where the headline would span the width of the slider either at the top or the bottom with the story's text displayed to the right of the image. I also would love the pagnation to display previews of the thumbnails underneath.

Is this at all possible? If not, I wouldn't simply mind something more appealing than the sorry abomination I was able to concoct.
 
Status
Not open for further replies.

Similar threads

  • Locked
  • thread_type.dbtech_ecommerce_suggestion thread_type.dbtech_ecommerce_suggestion
Legacy Vbslider
Replies
0
Views
2K
  • Locked
  • Support ticket Support ticket
Replies
2
Views
2K
  • Locked
  • Support ticket Support ticket
Replies
1
Views
1K

Legacy vBSlider

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
839
Customer rating
0.00 star(s) 0 ratings
Back
Top