• Resolved tggfref

    (@wppost)


    Поставил на другой сайт сей форум, вроде все ок, но зацепился за одну мелочь – прикрепление файлов к сообщению, а конкретнее прикрепление изображений.
    Думаю, было бы удобнее загруженные изображения отображать не простыми ссылками, а миниатюрами.
    При нажатии на ссылку на изображение стандартно открывается другая страница с этим изображением. Попытался ухватиться за класс ссылки или родителя, чтобы можно было цеплять fancybox или lightbox и открывать эти изображения тут же, без перехода, но классов нет, зацепиться не за что.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, Thomas
    It is possible to add a class (class=”name”) to a link? To connect fancybox, lightbox.

    forum-uploads.php
    $upload_list_elements .= '<li><a class="name" href="'.$url.utf8_encode($upload).'" target="_blank">'.$upload.'</a></li>';

    Plugin Author Asgaros

    (@asgaros)

    Hello all,

    I added a class to the links of uploaded files so that it looks like this now:
    <a class="uploaded-file" href="https://localhost/wordpress/wp-content/uploads/asgarosforum/217/my-file.png" target="_blank">my-file.png</a>

    You can find the patch for it here:
    https://github.com/Asgaros/asgaros-forum/commit/1d2cac9e779dfbfd994a87443dc36399ef83b222

    It will be available in the next release of the forum (which will get released when version 4.7 of WordPress is coming).

    • This reply was modified 8 years, 3 months ago by Asgaros.

    Thank you! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Прикрепленные изображения’ is closed to new replies.