Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2012-09-07 15:30:30

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

[ADDED IN 1.0.2] Link comments to video

I see these comments but it would be awesome to find out which video they commenting about. So it would be nice to click the comment and it bring you to the video that was commented on.

Offline

#2 2012-09-07 15:54:52

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [ADDED IN 1.0.2] Link comments to video

Hmmm...in the admin panel?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2012-09-07 17:28:03

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: [ADDED IN 1.0.2] Link comments to video

yeah. when i read a comment i have no idea what video they talking about.

Offline

#4 2012-09-07 21:20:17

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Re: [ADDED IN 1.0.2] Link comments to video

Need nice pro solution? Here you have.

Edir file /admin/modules/video/components/comments.php"
Find line:

"SELECT c.*, u.username

Change it to:

"SELECT c.*, u.username, v.title, v.slug

Find line:

LEFT JOIN #__user AS u ON (u.user_id = c.user_id)

Below insert new line:

LEFT JOIN #__video AS v ON (v.video_id = c.video_id)

Save changes to file.

Edit file /admin/templates/default/video_comments.tpl.php
Find line:

<td><?php echo long2ip($comment['ip']); ?></td>

Below insert new line:

<td width="15%" style="padding: 2px;"><?php echo '<a href="'.BASE_URL.'/'.$comment['video_id'].'/'.$comment['slug'].'">'. e(VText::truncate_chars($comment['title'], 16)).'</a>'; ?></td>

In next line change:  width="50%"
To: width="35%"

Save changes to file.

Now you will have a link to video with shortened title of video (opens in new window)
Do changes carefully. Best backup 2 edited files first!

Last edited by Nuevolab (2012-09-10 14:19:19)

Offline

#5 2012-09-08 18:31:50

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: [ADDED IN 1.0.2] Link comments to video

Works perfect, thanks.

Offline

#6 2012-09-10 09:06:03

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [ADDED IN 1.0.2] Link comments to video

The url is BASE_URL.'/'.$comment['video_id'].'/' and you also need SLUG here. Also we have VText::truncate_chars($text, $limit=100, $replace=' ...', $preserve_words=FALSE) already included. You dont need to include any files, just use the static method and it will work.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2012-09-10 14:12:22

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Re: [ADDED IN 1.0.2] Link comments to video

symtab wrote:

The url is BASE_URL.'/'.$comment['video_id'].'/' and you also need SLUG here.

I know it, anyway it's only for admin and finally your code redirects to correct url if only 'video_id' is correct :). But this is no problem to add slug to URL of course.

symtab wrote:

Also we have VText::truncate_chars($text, $limit=100, $replace=' ...', $preserve_words=FALSE) already included. You dont need to include any files, just use the static method and it will work.

I knew there must be truncate function somewhere, but was too lazy to look for it.

Updated code, I had to change truncate number parameter as your function works different (do not count dots)

Last edited by Nuevolab (2012-09-10 14:21:05)

Offline

#8 2012-09-11 13:01:19

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [ADDED IN 1.0.2] Link comments to video

Oki. Thanks for contributing.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#9 2012-09-11 13:42:59

videocasalinghi
Member
Registered: 2011-02-28
Posts: 160

Re: [ADDED IN 1.0.2] Link comments to video

Hi adrian

this option will be included in the next version?

Offline

#10 2012-09-14 04:34:46

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [ADDED IN 1.0.2] Link comments to video

Yes.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#11 2012-09-14 04:48:40

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [ADDED IN 1.0.2] Link comments to video

Added in 1.0.2


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#12 2012-09-15 10:41:40

videocasalinghi
Member
Registered: 2011-02-28
Posts: 160

Offline

#13 2012-10-29 07:36:26

rbmoss
Member
Registered: 2012-08-17
Posts: 36

Re: [ADDED IN 1.0.2] Link comments to video

that will be good as comments should be normally linked to videos

Offline

#14 2012-10-29 12:11:53

satty
Member
Registered: 2012-08-23
Posts: 29

Re: [ADDED IN 1.0.2] Link comments to video

ya thats  an obvious feature.

Offline

Board footer

Powered by FluxBB