View Full Version : how to add Website(s) name in postbit like WJ
Divvy
06-30-2011, 10:05 AM
I was doing this for couple of days ,but I just dont get it right. :(
I wanna add Website(s) name in postbit like wjunction
http://den.dikz.net/img/201105iqi.png
Did some of my own ,and the results are terrible
http://screensnapr.com/e/vkDuDk.jpg
Is any of you guys know how to do it right ? :)
Below is what I did so far.
Added to CSS:
.tinyfont {
font-size: 10px;
}
.tinyfont .webs {
margin-bottom: 4px;
}
.tinyfont .webs div {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #F9FAFA;
border-color: #E5E5E5 #E5E5E5 #E0E0E0;
border-radius: 2px 2px 2px 2px;
border-style: solid;
border-width: 1px;
margin-top: 2px;
overflow: hidden;
padding: 2px 3px 3px;
white-space: pre;
width: 130px;
}
.tinyfont .webs div:hover {
border: 1px solid #CCCCCC;
}
.tinyfont .webs div a {
display: block;
}
Added the code below to postbit_legacy:
<div class="tinyfont"><div class="webs">
<if condition="$post['field5']">$post[field5]</if>
</div></div><br /><br />
What I'm missing?
Can someone help me? :-)
Thank you!
Jeff Ledger
06-30-2011, 10:09 AM
can you give me a link to your site?
Divvy
06-30-2011, 10:14 AM
Jeff Ledger, PM sent :)
Jeff Ledger
06-30-2011, 10:26 AM
Css goes here
.sitelinks {
background: none repeat scroll 0 0 #F9FAFA;
border: 1px solid #EAEAEA;
margin-bottom: 4px;
padding: 2px 5px;
overflow: hidden; /*important */
width: 130px; /* set it to your postbit side width */
}
Add this to your postbit
<div class="sitelinks">
<if condition="$post['field5']">$post[field5]</if>
</div>
also it would be better if the links in field5 will be added like this
<p>link 1</p>
<p>link 2</p>
....
Divvy
06-30-2011, 10:56 AM
Thank you mate! It works :D
http://screensnapr.com/e/QoQFGN.jpg
Btw, why is not my code worked? I had everything in there... And the other website dont have the .sitelinks css.
I think that don't need to make the <p>link 1</p> thing, because layout is now fine with your code like you can see in the image above :)
Is difficult to make the website links clickable? :P
Jeff Ledger
06-30-2011, 11:02 AM
about the <p> tags. It something likes, table works but pure css is better.
I write my own css based on these site you linked and removed some unneeded line. Just it. You don't need 2 classes to display a simple background with border in your old code.
your current stage maybe like this:
link.com
link1.com
link2.com
change it to st like
<a href="link">link.com</a>
<a href="link1">link1.com</a>
Then you get it clickable
Divvy
06-30-2011, 11:07 AM
your current stage maybe like this:
link.com
link1.com
link2.com
change it to st like
<a href="link">link.com</a>
<a href="link1">link1.com</a>
Then you get it clickable
Ohhh yes I know that, but I dont want this only for me... I need to make automaticly like the other website have, so when my members added their URLS, will auto clickable without need the html code to make that :)
Is not possible? Too much work? Sorry to boring you mate and thank you for helping me.
Jeff Ledger
06-30-2011, 11:47 AM
possible only in case you will add multi-type fields
like this
<div class="sitelinks">
<if condition="$post['field5']"><a href="$post[field5]">$post[field5]</a></if>
<if condition="$post['field6']"><a href="$post[field6]">$post[field6]</a></if>
<if condition="$post['field7']"><a href="$post[field7]">$post[field7]</a></if>
<if condition="$post['field8']"><a href="$post[field8]">$post[field8]</a></if>
</div>
Then in every field they just put one link, and it will be clickable
Divvy
06-30-2011, 11:59 AM
Ohhh damn... is not possible in other way? :)
Jeff Ledger
06-30-2011, 12:03 PM
You will need to hire someone to creat you a custom mods.
Not anything can be done using custom template.
or your users must fill out st like
<a href="link">link.com</a>
<a href="link1">link1.com</a>
in the field 5.
Divvy
06-30-2011, 12:09 PM
ok thank you mate :)
Jeff Ledger
06-30-2011, 12:10 PM
You are welcome !
BirdOPrey5
06-30-2011, 04:28 PM
You will need to hire someone to creat you a custom mods.
Not anything can be done using custom template.
or your users must fill out st like
<a href="link">link.com</a>
<a href="link1">link1.com</a>
in the field 5.
I'm pretty sure users can't use HTML in profile fields- it wold be a big security risk to let them.
Adrian Schneider
06-30-2011, 04:33 PM
You'd just need a plugin at postbit_display_start (top of my head)...
$post['links'] = '';
foreach (explode("\n", $post['field5']) as $link) {
$post['links'] .= "<div><a href=\"$link\">$link</a></div>";
}
Jeff Ledger
06-30-2011, 04:37 PM
I'm pretty sure users can't use HTML in profile fields- it wold be a big security risk to let them.
Thanks Joe, that why I said not everything can be done using custom template.
@Adrian, small but useful plugins.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.