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.
Pages: 1
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
Hmmm...in the admin panel?
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
yeah. when i read a comment i have no idea what video they talking about.
Offline
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
Works perfect, thanks.
Offline
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
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.
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
Oki. Thanks for contributing.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Hi adrian
this option will be included in the next version?
Offline
Yes.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Added in 1.0.2
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
ok good :-)
Offline
that will be good as comments should be normally linked to videos
Offline
ya thats an obvious feature.
Offline
Pages: 1