PEAK XOOPS - Vote only first picture in englishin japanese

Vote only first picture

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/11 0:04
slyss79  »°Åù·³Áâ   Posts: 143
Hi everybody

i need a littel (?) hack for myablum

what i have:

i have a gallery of 100 models... every models have a personal sub-gal with 5 pictures

i need: my users can vote only FIRST picture of the models...

(in others words: the button VOTE is visible only in the first pictures of all models)

can you help me?

thanks
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/11 5:04
GIJOE  ÀèǤ·³Áâ   Posts: 4110
It is necessary to hack php codes.
I can't help you, sorry.

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/11 22:45
slyss79  »°Åù·³Áâ   Posts: 143
Quote:
GIJOE wrote:
It is necessary to hack php codes.
I can't help you, sorry.


no problem because i have just solved...

but i have another question:

for example i have: myalbum3/viewcat.php?cid=2 and i need to show user id ...

in category 2 there 4 photos, all of user "jordan" and i want to show a link (under this photos in viewcat.php) of userinfo.php?=uid='uid_of_user_jordan'

i have try this way:
$uidsly = $xoopsDB->query( "SELECT submitter FROM $table_photos WHERE lid='$lid'" ) ;
because the last var $lid in this page is of a picture of this user... but don't work...

i have try <$photo.submitter> or <$submitter> or <$where> or <$uid> but nothing... how can i do this? i must hack viewcat.php?... thanks


thanks...
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/13 4:55
GIJOE  ÀèǤ·³Áâ   Posts: 4110
In myalbum*_viewcat_list.html?

You can access the top of photos by
<{$photos[0]}>

Thus, you can get the submitter by
UID: <{$photos[0].submitter}>
NAME: <{$photos[0].submitter_name}>

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/13 19:47
slyss79  »°Åù·³Áâ   Posts: 143
hi GIJOE and thanks for your reply...

i need to know uid in myalbum3_viewcat_table.html

this is my situation:

in myalbum3 i have some models
http://img95.imageshack.us/img95/8374/immagine1ew5.png

so, when you click (for examp) on Jennifer lopez you can see 3 items:

1) a button for vote jennifer (i made votation with last $lid in this page)
2) 4 photos of jennifer
3) a link to go at userinfo.php?uid=uid of submitter of this photos ... it mean userinfo of this model
http://img135.imageshack.us/img135/8186/immagine2wd2.png

i need to go back to know uid of the last $lid of this page...

i hope you understand my problem....

thans a lot GIJOE


if necessary you can see my myalbum3_viewcat_table.html here:

<{strip}>
<table width="100%" cellspacing="0" class="outer">
  <tr>
    <td class="even">
      <{include file="db:myalbum3_header.html"}>
      <table border='0' cellpadding='0' cellspacing='0' width='100%'>
        <tr>
          <td align='left'>
            <span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span>
          </td>
          <td align='right'>
          <span style="font-weight:bold;"><a href='index.php'>Torna alla lista delle modelle</a></span>
          </td>
        </tr>
      </table>
      <{if count( $subcategories ) > 0 }>
        <hr />
        <{include file="db:myalbum3_categories.html"}>
      <{/if}>
    </td>
  </tr>
</table>
<br />

<{if $photo_small_sum < 1 }>
  <div align="center">
    <{$lang_nomatch}>
  </div>
<{else}>
  <table width="100%" cellspacing="0" class="outer">
    <tr>
      <td class="even" align="left">
        <{if $photo_small_sum > 1 }>
          <div align="center">
    <!--        <{$lang_sortby}>  
            <{$lang_title}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=titleA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=titleD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>) 
            <{$lang_date}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=dateA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=dateD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>) 
            <{if $canrateview }>
              <{$lang_rating}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=ratingA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=ratingD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>) 
            <{/if}>
            <{$lang_popularity}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=hitsA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=hitsD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)
            <br />
            <b><{$lang_cursortedby}></b>
            <br />
            <br />  -->
            <table border='0' cellpadding='0' cellspacing='0' width='100%'>
              <tr>
                <td align='center'><{foreach from=$photos item=photo}><{/foreach}>
                  <a href='<{$mod_url}>/ratephoto.php?lid=<{$photo.lid}>'><img src='http://www.stefanosnetwork.com/site/uploads/img44dd9e84594a0.gif' border='0'><br /><b><font color='red' size='4'><u>CLICCA QUI</u><br />PER VOTARE QUESTA MODELLA</b></font></a>
                </td>
                <td align='right'>
                  <{$photonav}>
                </td>
              </tr>
            </table>
          </div>
          <hr />
        <{/if}>
        <table width='100%' cellspacing='0' cellpadding='0' border='0'>
          <tr>
            <{foreach from=$photos item=photo}>
              <td align='center' style='margin:0px;padding:5px 0px;'>
                <a href='<{$mod_url}>/photo.php?lid=<{$photo.lid}>'><img src='<{$photo.imgsrc_thumb}>' <{$photo.width_spec}> alt='<{$photo.title}>' title='<{$photo.title}>' border='0' /></a>
              </td>
              <{if $photo.count is div by $colsoftableview }>
                </tr>
                <tr>
              <{/if}>
            <{/foreach}>

          </tr>
        </table>

        <{if $photo_small_sum > 1 }>
          <hr />
          <div align="center">
            <table border='0' cellpadding='0' cellspacing='0' width='100%'>
              <tr>
                <td align='center'><br /><span style="font-weight:bold;"><img src='http://www.stefanosnetwork.com/site/uploads/img44ddc1576426d.gif'><br />Altre notizie su questa modella?<br /><u>Clicca sulle foto</u> e potrai leggere tante altre info su di essa.</span><br /><br />
           <!--       <a href='<{$mod_url}>/ratephoto.php?lid=<{$photo.lid}>'><b><font color='red' size='4'><u>CLICCA QUI</u><br />PER VOTARE QUESTA MODELLA</b></font></a>  -->
                </td>
                <td align='right'>
                </td>
              </tr>
            </table>
          </div>
        <{/if}>
      </td>
    </tr>
  </table>
<{/if}>
<br />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td align="center">
      <br />
      <{include file='db:system_notification_select.html'}>
      <br />
      <{include file="db:myalbum3_footer.html"}>
    </td>
  </tr>
</table>
<{/strip}>
Votes:1 Average:10.00

question Re: Vote only first picture

msg# 1.1.1.1.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/15 5:16
GIJOE  ÀèǤ·³Áâ   Posts: 4110
It is same to get poster's uid.
If you get the uid, you can make the link for userinfo easily.
Votes:0 Average:0.00

question Re: Vote only first picture

msg# 1.1.1.1.1.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/15 8:09
slyss79  »°Åù·³Áâ   Posts: 143
like you can see from this

http://img90.imageshack.us/img90/3937/immagine2ka6.png

http://img74.imageshack.us/img74/542/immagine3tf4.png

i have try it in myalbum3_viewcat_table.html and it dosn't work...

(in myalbum3_viewcat_list.html it work good)

i need it work in myalbum3_viewcat_table.html

thanks for your time...



Votes:0 Average:0.00

question Re: Vote only first picture

msg# 1.1.1.1.1.1.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/16 5:41
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Perhaps, you've never gotten the right template for myalbum3.
Votes:0 Average:0.00

question Re: Vote only first picture

msg# 1.1.1.1.1.1.1.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/16 6:39
slyss79  »°Åù·³Áâ   Posts: 143
Quote:
GIJOE wrote:
Perhaps, you've never gotten the right template for myalbum3.

no, because when i modify the template by tpl i receive the right modification....

i have try in myalbum3_viewcat_list.html and
UID: <{$photos[0].submitter}>
NAME: <{$photos[0].submitter_name}>
work good...

but in myalbum3_viewcat_table.html no.....

this is my myalbum3_viewcat_table.html

<{strip}>
<table width="100%" cellspacing="0" class="outer">
  <tr>
    <td class="even">
      <{include file="db:myalbum3_header.html"}>
      <table border='0' cellpadding='0' cellspacing='0' width='100%'>
        <tr>
          <td align='left'>
            <span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a> : <{$album_sub_title}></span>
          </td>
          <td align='right'>
          <span style="font-weight:bold;"><a href='index.php'><{$myalbum3_tornalista}></a></span>
          </td>
        </tr>
      </table>
      <{if count( $subcategories ) > 0 }>
        <hr />
        <{include file="db:myalbum3_categories.html"}>
      <{/if}>
    </td>
  </tr>
</table>
<br />

<{if $photo_small_sum < 1 }>
  <div align="center">
    <{$lang_nomatch}>
  </div>
<{else}>
  <table width="100%" cellspacing="0" class="outer">
    <tr>
      <td class="even" align="left">
        <{if $photo_small_sum > 1 }>
          <div align="center">
    <!--        <{$lang_sortby}>  
            <{$lang_title}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=titleA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=titleD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>) 
            <{$lang_date}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=dateA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=dateD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>) 
            <{if $canrateview }>
              <{$lang_rating}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=ratingA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=ratingD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>) 
            <{/if}>
            <{$lang_popularity}> (<a href="viewcat.php?cid=<{$category_id}>&orderby=hitsA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&orderby=hitsD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)
            <br />
            <b><{$lang_cursortedby}></b>
            <br />
            <br />  -->
            <table border='0' cellpadding='0' cellspacing='0' width='100%'>
              <tr>
                <td align='center'><{foreach from=$photos item=photo}><{/foreach}>
                  <a href='<{$mod_url}>/ratephoto.php?lid=<{$photo.lid}>'><img src='http://www.stefanosnetwork.com/site/uploads/img44dd9e84594a0.gif' border='0'><br /><b><font color='red' size='4'><{$myalbum3_cliccapervotare}></b></font></a>
                </td>
                <td align='right'>
                  <{$photonav}>
                </td>
              </tr>
            </table>
          </div>
          <hr />
        <{/if}>
        <table width='100%' cellspacing='0' cellpadding='0' border='0'>
          <tr>
            <{foreach from=$photos item=photo}>
              <td align='center' style='margin:0px;padding:5px 0px;'>
                <a href='<{$mod_url}>/photo.php?lid=<{$photo.lid}>'><img src='<{$photo.imgsrc_thumb}>' <{$photo.width_spec}> alt='<{$photo.title}>' title='<{$photo.title}>' border='0' /></a>
              </td>
              <{if $photo.count is div by $colsoftableview }>
                </tr>
                <tr>
              <{/if}>
            <{/foreach}>

          </tr>
        </table>

        <{if $photo_small_sum > 1 }>
          <hr />
          <div align="center">
            <table border='0' cellpadding='0' cellspacing='0' width='100%'>
              <tr>
                <td align='center'><br /><span style="font-weight:bold;"><img src='http://www.stefanosnetwork.com/site/uploads/img44ddc1576426d.gif'><br /><{$myalbum3_altrenotizie}></span><br /><br />
           <!--       <a href='<{$mod_url}>/ratephoto.php?lid=<{$photo.lid}>'><b><font color='red' size='4'><u>CLICCA QUI</u><br />PER VOTARE QUESTA MODELLA</b></font></a>  -->
                </td>
                <td align='right'>
                </td>
              </tr>
            </table>
          </div>
        <{/if}>
      </td>
    </tr>
  </table>
<{/if}>
<br />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td align="center">
      <{include file='db:system_notification_select.html'}>
      <br />
      <{include file="db:myalbum3_footer.html"}>
    </td>
  </tr>
</table>
<{/strip}>
Votes:1 Average:10.00

question Re: Vote only first picture

msg# 1.1.1.1.1.1.1.1.1.1
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/8/17 18:32
slyss79  »°Åù·³Áâ   Posts: 143
hi GIJOE

i'm sure:

in myalbum3_viewcat_table.html <{$photos[0].submitter}> or <{$photos[0].submitter_name}> don't work.....

please try yourself....

thanks a lot for your time...

Votes:3 Average:6.67

question Re: Vote only first picture

msg# 1.1.1.1.1.1.1.1.1.1.1
Previous post - Next post | Parent - No child | Posted on 2006/8/21 6:47
slyss79  »°Åù·³Áâ   Posts: 143
hi gijoe... i have found the problem:

i use view_table.html for template and into viewcat.php i have see:

if( $view == 'table' ) {
	$xoopsOption['template_main'] = "myalbum{$mydirnumber}_viewcat_table.html" ;
	$function_assigning = 'myalbum_get_array_for_photo_assign_light' ;

} else {
	$xoopsOption['template_main'] = "myalbum{$mydirnumber}_viewcat_list.html" ;
	$function_assigning = 'myalbum_get_array_for_photo_assign' ;
}

i have delete light and i have solved the problem...

thanks.... bye... ly
Votes:0 Average:0.00

question Re: Vote only first picture

msg# 1.1.1.1.1.1.1.1.1.1.2
Previous post - Next post | Parent - No child | Posted on 2006/8/23 4:55
GIJOE  ÀèǤ·³Áâ   Posts: 4110
for table view, submitter is not assigned.

If you want assign it, edit myalbum_get_array_for_photo_assign_light in include/draw_functions.php
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!