Can someone help me here?

Topics that have been resolved and may be useful but do not fit into the knowledge base - either they're too specific, or they're duplicate questions.

Moderator: Help Desk Team

Can someone help me here?

Postby Skip_lizard » January 17th, 2010, 9:38 am

The comic pages in my comic (http://wizard.smackjeeves.com) has a few things I want changed but I don't know how.

-I want the text smaller in the comments (date, time, etc)
-I want the author avatar to be half sized (if posible)

This is the code currently used:
Spoiler! :
<table cellpadding="20">
<tr align="center">
<td bgcolor="#001166">

<h1>{COMIC_TITLE}</h1>
<h3>{COMIC_POST_DATE}</h3>

<!-- BEGIN comic_image -->
{comic_image.FORMATTED}
<!-- END comic_image -->
<!-- BEGIN switch_no_comic_image -->
<img src="http://i606.photobucket.com/albums/tt146/b-cor/nocomic.png" width="600" height="400">
<!-- END switch_no_comic_image -->

<br>
<a href="http://www.smackjeeves.com/mailtofriend.php?cid={COMIC_ID}" onClick="var new_window = window.open('http://www.smackjeeves.com/mailtofriend.php?cid={COMIC_ID}', 'mail_to_friend', 'width=640, height=480, scrollbars=yes'); new_window.focus(); return false;">Email this to a friend!</a><br />
<br>

<a href={NAV_FIRST}>-- First --</a>&nbsp;&nbsp;&nbsp;
<a href={NAV_PREV}>-- Previous --</a>&nbsp;&nbsp;
&nbsp;&nbsp;<a href="{NAV_NEXT}">-- Next --</a>
&nbsp;&nbsp;&nbsp;<a href="{NAV_LAST}">-- Last --</a>
<form name="jumpbox" method="GET">
<input type="hidden" name="url" value="{SITE_URL}">
<input type="hidden" name="page" value="comic">
<select name="url" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="-1"> [Archive]</option>
<!-- BEGIN jumpbox -->
<option value="{jumpbox.COMIC_URL}">{jumpbox.COMIC_NUMBER} - {jumpbox.COMIC_TITLE}</option>
<!-- END jumpbox -->
</select>
</form>
</td>
</table>
<table id="comments_container"><tr><td>

<!-- BEGIN switch_author_comments -->
<h1 class="sub-title">Author's Comments:</h1>
<!-- END switch_author_comments -->

<!-- BEGIN loop_author_comments -->
<h1 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_author_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_author_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_author_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_author_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By:<a href="{loop_author_comments.POSTER_PROFILE_URL}" target="_profile">{loop_author_comments.NAME}</a>, {loop_author_comments.DATE_POSTED}
</h1>
<p>
<!-- BEGIN switch_poster_avatar -->
<img src="{loop_author_comments.POSTER_AVATAR_IMG_SRC}" height="{loop_author_comments.POSTER_AVATAR_IMG_HEIGHT}" width="{loop_author_comments.POSTER_AVATAR_IMG_WIDTH}" />
<!-- END switch_poster_avatar -->
<b>{loop_author_comments.POST_TITLE}</b>
{loop_author_comments.MESSAGE}
</p>
<!-- END loop_author_comments -->

<!-- BEGIN switch_user_comments -->
<h1 class="sub-title">User's Comments:</h1>
<!-- END switch_user_comments -->

<!-- BEGIN loop_user_comments -->
<h1 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_user_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_user_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_user_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_user_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By:<a href="{loop_user_comments.POSTER_PROFILE_URL}" target="_profile">{loop_user_comments.NAME}</a>, {loop_user_comments.DATE_POSTED}</h1>
<p>
<!-- BEGIN switch_poster_avatar -->
<img src="{loop_user_comments.POSTER_AVATAR_IMG_SRC}" height="{loop_user_comments.POSTER_AVATAR_IMG_HEIGHT}" width="{loop_user_comments.POSTER_AVATAR_IMG_WIDTH}" />
<!-- END switch_poster_avatar -->
<b>{loop_user_comments.POST_TITLE}</b>
{loop_user_comments.MESSAGE}
</p>
<!-- END loop_user_comments -->

<h1 class="post-me"><a href="/postcomment.php?cid={COMIC_ID}" onClick="var new_window = window.open('/postcomment.php?cid={COMIC_ID}', 'sj_comment', 'height=350, width=420'); new_window.focus(); return false;">Post A Comment</a></h1>

</td></tr></table>
Skip_lizard
 

Re: Can someone help me here?

Postby Asj » January 17th, 2010, 9:55 am

It's possible, but I'm not sure what needs to be done.
Code: Select all
<img src="{loop_author_comments.POSTER_AVATAR_IMG_SRC}" height="{loop_author_comments.POSTER_AVATAR_IMG_HEIGHT}" width="{loop_author_comments.POSTER_AVATAR_IMG_WIDTH}" />

This part tells how big to make the avatars. You need to divide the height and width by 2. I don't know if you can do that within the html, or if it needs to be done in javascript... I've been wanting to do something like that myself.

Code: Select all
<h2 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_author_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_author_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_author_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_author_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By:<a href="{loop_author_comments.POSTER_PROFILE_URL}" target="_profile">{loop_author_comments.NAME}</a>, {loop_author_comments.DATE_POSTED}
</h2>
<p>
<!-- BEGIN switch_poster_avatar -->
<img src="{loop_author_comments.POSTER_AVATAR_IMG_SRC}" height="{loop_author_comments.POSTER_AVATAR_IMG_HEIGHT}" width="{loop_author_comments.POSTER_AVATAR_IMG_WIDTH}" />
<!-- END switch_poster_avatar -->
<b>{loop_author_comments.POST_TITLE}</b>
{loop_author_comments.MESSAGE}
</p>
<!-- END loop_author_comments -->

<!-- BEGIN switch_user_comments -->
<h1 class="sub-title">User's Comments:</h1>
<!-- END switch_user_comments -->

<!-- BEGIN loop_user_comments -->
<h2 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_user_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_user_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_user_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_user_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By:<a href="{loop_user_comments.POSTER_PROFILE_URL}" target="_profile">{loop_user_comments.NAME}</a>, {loop_user_comments.DATE_POSTED}</h2>


See the h2's? What I did was change h1 to h2. If you want it smaller than that, try h3 instead of h2. If you want "User's Comments" and "Author's Comments" to be smaller, as well, change that to h2 or h3, also.
Image
User avatar
Asj
 
Posts: 944
Joined: January 4th, 2009, 5:42 pm

Re: Can someone help me here?

Postby Asj » January 17th, 2010, 2:06 pm

Got it. ^_^

This will make everyone's avatar 50% and makes the comment headings smaller, as well as the text "Author's Comments", "User Comments", and "Post a Comment".
Spoiler! :
Code: Select all
<script language="JavaScript" type="text/javascript">

/* <![CDATA[ */

function build_avatar(imgsrc,height,width)
{

height = height / 2;
width = width / 2;

document.write('<img src="' + imgsrc + '" height="' + height + '" width="' + width + '" />');

}

/* ]]> */

</script>

<table cellpadding="20">
<tr align="center">
<td bgcolor="#001166">

<h1>{COMIC_TITLE}</h1>
<h3>{COMIC_POST_DATE}</h3>

<!-- BEGIN comic_image -->
{comic_image.FORMATTED}
<!-- END comic_image -->
<!-- BEGIN switch_no_comic_image -->
<img src="http://i606.photobucket.com/albums/tt146/b-cor/nocomic.png" width="600" height="400">
<!-- END switch_no_comic_image -->

<br>
<a href="http://www.smackjeeves.com/mailtofriend.php?cid={COMIC_ID}" onClick="var new_window = window.open('http://www.smackjeeves.com/mailtofriend.php?cid={COMIC_ID}', 'mail_to_friend', 'width=640, height=480, scrollbars=yes'); new_window.focus(); return false;">Email this to a friend!</a><br />
<br>

<a href={NAV_FIRST}>-- First --</a>&nbsp;&nbsp;&nbsp;
<a href={NAV_PREV}>-- Previous --</a>&nbsp;&nbsp;
&nbsp;&nbsp;<a href="{NAV_NEXT}">-- Next --</a>
&nbsp;&nbsp;&nbsp;<a href="{NAV_LAST}">-- Last --</a>
<form name="jumpbox" method="GET">
<input type="hidden" name="url" value="{SITE_URL}">
<input type="hidden" name="page" value="comic">
<select name="url" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="-1"> [Archive]</option>
<!-- BEGIN jumpbox -->
<option value="{jumpbox.COMIC_URL}">{jumpbox.COMIC_NUMBER} - {jumpbox.COMIC_TITLE}</option>
<!-- END jumpbox -->
</select>
</form>
</td>
</table>
<table id="comments_container"><tr><td>

<!-- BEGIN switch_author_comments -->
<h2 class="sub-title">Author's Comments:</h2>
<!-- END switch_author_comments -->

<!-- BEGIN loop_author_comments -->
<h3 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_author_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_author_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_author_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_author_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By: <a href="{loop_author_comments.POSTER_PROFILE_URL}" target="_profile">{loop_author_comments.NAME}</a>, {loop_author_comments.DATE_POSTED}
</h3>
<p>
<!-- BEGIN switch_poster_avatar -->

<script language="JavaScript" type="text/javascript">/* <![CDATA[ */build_avatar('{loop_author_comments.POSTER_AVATAR_IMG_SRC}',{loop_author_comments.POSTER_AVATAR_IMG_HEIGHT},{loop_author_comments.POSTER_AVATAR_IMG_WIDTH});/* ]]> */</script>

<!-- END switch_poster_avatar -->
<b>{loop_author_comments.POST_TITLE}</b>
{loop_author_comments.MESSAGE}
</p>
<!-- END loop_author_comments -->

<!-- BEGIN switch_user_comments -->
<h2 class="sub-title">User's Comments:</h2>
<!-- END switch_user_comments -->

<!-- BEGIN loop_user_comments -->
<h3 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_user_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_user_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_user_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_user_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By: <a href="{loop_user_comments.POSTER_PROFILE_URL}" target="_profile">{loop_user_comments.NAME}</a>, {loop_user_comments.DATE_POSTED}</h3>
<p>
<!-- BEGIN switch_poster_avatar -->

<script language="JavaScript" type="text/javascript">/* <![CDATA[ */build_avatar('{loop_user_comments.POSTER_AVATAR_IMG_SRC}',{loop_user_comments.POSTER_AVATAR_IMG_HEIGHT},{loop_user_comments.POSTER_AVATAR_IMG_WIDTH});/* ]]> */</script>

<!-- END switch_poster_avatar -->
<b>{loop_user_comments.POST_TITLE}</b>
{loop_user_comments.MESSAGE}
</p>
<!-- END loop_user_comments -->

<h2 class="post-me"><a href="/postcomment.php?cid={COMIC_ID}" onClick="var new_window = window.open('/postcomment.php?cid={COMIC_ID}', 'sj_comment', 'height=350, width=420'); new_window.focus(); return false;">Post A Comment</a></h2>

</td></tr></table>

This makes only the author avatars 50% sized, and makes only the comment header text smaller (and not as small as in the above code - if you want to make it smaller, you can search for h2 and replace all of them with h3).
Spoiler! :
Code: Select all
<script language="JavaScript" type="text/javascript">

/* <![CDATA[ */

function build_avatar(imgsrc,height,width)
{

height = height / 2;
width = width / 2;

document.write('<img src="' + imgsrc + '" height="' + height + '" width="' + width + '" />');

}

/* ]]> */

</script>

<table cellpadding="20">
<tr align="center">
<td bgcolor="#001166">

<h1>{COMIC_TITLE}</h1>
<h3>{COMIC_POST_DATE}</h3>

<!-- BEGIN comic_image -->
{comic_image.FORMATTED}
<!-- END comic_image -->
<!-- BEGIN switch_no_comic_image -->
<img src="http://i606.photobucket.com/albums/tt146/b-cor/nocomic.png" width="600" height="400">
<!-- END switch_no_comic_image -->

<br>
<a href="http://www.smackjeeves.com/mailtofriend.php?cid={COMIC_ID}" onClick="var new_window = window.open('http://www.smackjeeves.com/mailtofriend.php?cid={COMIC_ID}', 'mail_to_friend', 'width=640, height=480, scrollbars=yes'); new_window.focus(); return false;">Email this to a friend!</a><br />
<br>

<a href={NAV_FIRST}>-- First --</a>&nbsp;&nbsp;&nbsp;
<a href={NAV_PREV}>-- Previous --</a>&nbsp;&nbsp;
&nbsp;&nbsp;<a href="{NAV_NEXT}">-- Next --</a>
&nbsp;&nbsp;&nbsp;<a href="{NAV_LAST}">-- Last --</a>
<form name="jumpbox" method="GET">
<input type="hidden" name="url" value="{SITE_URL}">
<input type="hidden" name="page" value="comic">
<select name="url" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="-1"> [Archive]</option>
<!-- BEGIN jumpbox -->
<option value="{jumpbox.COMIC_URL}">{jumpbox.COMIC_NUMBER} - {jumpbox.COMIC_TITLE}</option>
<!-- END jumpbox -->
</select>
</form>
</td>
</table>
<table id="comments_container"><tr><td>

<!-- BEGIN switch_author_comments -->
<h1 class="sub-title">Author's Comments:</h1>
<!-- END switch_author_comments -->

<!-- BEGIN loop_author_comments -->
<h2 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_author_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_author_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_author_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_author_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By: <a href="{loop_author_comments.POSTER_PROFILE_URL}" target="_profile">{loop_author_comments.NAME}</a>, {loop_author_comments.DATE_POSTED}
</h2>
<p>
<!-- BEGIN switch_poster_avatar -->

<script language="JavaScript" type="text/javascript">/* <![CDATA[ */build_avatar('{loop_author_comments.POSTER_AVATAR_IMG_SRC}',{loop_author_comments.POSTER_AVATAR_IMG_HEIGHT},{loop_author_comments.POSTER_AVATAR_IMG_WIDTH});/* ]]> */</script>

<!-- END switch_poster_avatar -->
<b>{loop_author_comments.POST_TITLE}</b>
{loop_author_comments.MESSAGE}
</p>
<!-- END loop_author_comments -->

<!-- BEGIN switch_user_comments -->
<h1 class="sub-title">User's Comments:</h1>
<!-- END switch_user_comments -->

<!-- BEGIN loop_user_comments -->
<h2 class="cpost-header">
<span>
<!-- BEGIN switch_user_can_edit -->
<a href="{loop_user_comments.EDIT_LINK}" onClick="var new_window = window.open('{loop_user_comments.EDIT_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[Edit]</a>
<!-- END switch_user_can_edit -->
<!-- BEGIN switch_user_can_delete -->
<a href="{loop_user_comments.DELETE_LINK}" onClick="var new_window = window.open('{loop_user_comments.DELETE_LINK}', 'sj_comment', 'height=320, width=420'); new_window.focus(); return false;">[X]</a>
<!-- END switch_user_can_delete -->
</span>
Posted By: <a href="{loop_user_comments.POSTER_PROFILE_URL}" target="_profile">{loop_user_comments.NAME}</a>, {loop_user_comments.DATE_POSTED}</h2>
<p>
<!-- BEGIN switch_poster_avatar -->

<img src="{loop_user_comments.POSTER_AVATAR_IMG_SRC}" height="{loop_user_comments.POSTER_AVATAR_IMG_HEIGHT}" width="{loop_user_comments.POSTER_AVATAR_IMG_WIDTH}" />

<!-- END switch_poster_avatar -->
<b>{loop_user_comments.POST_TITLE}</b>
{loop_user_comments.MESSAGE}
</p>
<!-- END loop_user_comments -->

<h1 class="post-me"><a href="/postcomment.php?cid={COMIC_ID}" onClick="var new_window = window.open('/postcomment.php?cid={COMIC_ID}', 'sj_comment', 'height=350, width=420'); new_window.focus(); return false;">Post A Comment</a></h1>

</td></tr></table>
Image
User avatar
Asj
 
Posts: 944
Joined: January 4th, 2009, 5:42 pm

Re: Can someone help me here?

Postby Skip_lizard » January 18th, 2010, 3:11 pm

thanks!
Skip_lizard
 

Re: Can someone help me here?

Postby Asj » January 18th, 2010, 4:41 pm

you're welcome. ^_^
Image
User avatar
Asj
 
Posts: 944
Joined: January 4th, 2009, 5:42 pm


Return to Resolved Topics

Who is online

Users browsing this forum: No registered users and 0 guests