Free Adult Tube-Video Script Forum
Categories and multi-categories - Printable Version

+- Free Adult Tube-Video Script Forum (http://freeadultscript.com/forum)
+-- Forum: My Category (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Categories and multi-categories (/showthread.php?tid=298)



Categories and multi-categories - Role-Model - 26-03-2011 04:33 PM

Can some one show how to add categorie bolow every video, and admin can you add to choose multy categories for videos?

Regards
svetoslav


RE: Categories and multi-categories - Punktured - 26-03-2011 04:46 PM

you would have to edit the function which shows the videos.

there are two lines which you would have to edit.

CODE REMOVED

NOTE:
I do not currently have a site up, so this code is untested.
It is also a wise idea, to save a copy of the original functions.php file before making changes to it.




As for multiple categories, maybe you can add that into the requests forum.


RE: Categories and multi-categories - Role-Model - 26-03-2011 06:11 PM

I try it but shows only number of category Sad
I add '<br>added:'.urldecode($row['tarih']).'

Kind Regards
Svetoslav

PS: Congratulations for position you earn!!! Wish you well.

(26-03-2011 04:46 PM)Punktured Wrote:  you would have to edit the function which shows the videos.

there are two lines which you would have to edit.

CODE REMOVED

NOTE:
I do not currently have a site up, so this code is untested.
It is also a wise idea, to save a copy of the original functions.php file before making changes to it.




As for multiple categories, maybe you can add that into the requests forum.



RE: Categories and multi-categories - Punktured - 26-03-2011 06:43 PM

oh ok, sorry about that.
i forgot how the mysql table was.

i havent got a site so i cant make the proper code you want,
because i cant test it.

by the way, tarih is not url encoded so you dont need to decode it.


RE: Categories and multi-categories - admin - 27-03-2011 01:04 AM

tarih=date
at mysql in table video fiield=category is an id that shows the id nuber of category table id number
so you must to connect category field to find the category name


RE: Categories and multi-categories - Punktured - 27-03-2011 01:54 AM

yea, when i did have my site,
i did have the code for this, because i did it on my own site.

but i dont have the site anymore, and i have nowhere to test code,
so i rather not post anymore untested code at this time.

when i find a free-adult-host and get a site up,
i will re-do the code and post it here.


RE: Categories and multi-categories - Punktured - 27-03-2011 05:38 AM

ok, well, you know how to add "date added" so i will show code just to add category.
there is 2 lines which need replaced, and replaced with extra code.


line 1 , replace:
Code:
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a></td>';

with this:

Code:
$cat_id = $row['category'];
$sql_sorgu3="Select * from category where `id` = '$cat_id'";
$result3 = mysql_query($sql_sorgu3);
while($row3 = mysql_fetch_array($result3))
  {
$category = $row3['category'];
}
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a><br>Category: '.$category.'</td>';




line 2 , replace:
Code:
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a></td>';

with this:

Code:
$cat_id = $row['category'];
$sql_sorgu3="Select * from category where `id` = '$cat_id'";
$result3 = mysql_query($sql_sorgu3);
while($row3 = mysql_fetch_array($result3))
  {
$category = $row3['category'];
}
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a><br>Category: '.$category.'</td>';



RE: Categories and multi-categories - Role-Model - 27-03-2011 11:21 AM

It works perfect, but it not conver text in utf-8 and show some signs Sad
Thank you in advance Smile



(27-03-2011 05:38 AM)Punktured Wrote:  ok, well, you know how to add "date added" so i will show code just to add category.
there is 2 lines which need replaced, and replaced with extra code.


line 1 , replace:
Code:
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a></td>';

with this:

Code:
$cat_id = $row['category'];
$sql_sorgu3="Select * from category where `id` = '$cat_id'";
$result3 = mysql_query($sql_sorgu3);
while($row3 = mysql_fetch_array($result3))
  {
$category = $row3['category'];
}
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a><br>Category: '.$category.'</td>';




line 2 , replace:
Code:
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a></td>';

with this:

Code:
$cat_id = $row['category'];
$sql_sorgu3="Select * from category where `id` = '$cat_id'";
$result3 = mysql_query($sql_sorgu3);
while($row3 = mysql_fetch_array($result3))
  {
$category = $row3['category'];
}
$data=$data.'<td  valign="top"><a  href="'.$root_url.$linki.'"><div align="center"><img multiple_thumbnail_url="g" class="video-thumb" border="0" src="'.$root_url.'img/thumb/'.$row['v_id'].'_0.jpg" num="'.$row['num'].'" id="thumb'.($i+1).'" alt="'.urldecode($row['title']).'" width="160" height="120" /></div>'.urldecode($row['title']).'</a><br>Category: '.$category.'</td>';



RE: Categories and multi-categories - Punktured - 27-03-2011 12:06 PM

can you send me your site URL in private message please, so i can see what you mean.