Eole211 / HumShare

Module for HumHub to share things with your friends inside a space.
7 stars 5 forks source link

upload Images #6

Open redlaguna opened 5 years ago

redlaguna commented 5 years ago

Hello, it would be possible to implement the upload of images to make the publications more attractive. I have tried to make the necessary modifications but they are only uploaded when editing the publication, but not in new publications.

Eole211 commented 5 years ago

Hello ! I wasn't sure anybody used HumShare ... It's been a while since I worked on it ( it still runs on recent HumHub versions oO ?! ), my friends and I not using it anymore. Well, I'll look into that when I have some time ( maybe in early april ) Cheers, and thanks for your feedback.

redlaguna commented 5 years ago

Hello,

this is my modified version that works with the latest version of humhub, I am not a programmer but I have moved some things from place in the index, you can please try it at any opportunity you have.

redlaguna commented 4 years ago

@Ace2213

I have corrected the mentioned errors, please install this new file.

redlaguna commented 4 years ago

Hi @Ace2213 thank you for your recomendations. Finances is a module for a control of payment in the community, only for registration, is a modification of wiki module. I have not been able to finish it because as I have said I am not a programmer, I only try to adapt what already exists for what I need but it takes me a long time to do it

redlaguna commented 4 years ago

once I had a strange problem and the error was the encoding of the file, it was in UTF and I changed it to UTF without BOM and the error went away

redlaguna commented 4 years ago

This work for me


use yii\helpers\Html;
use humhub\widgets\RichtextField;

humhub\modules\classifieds\Assets::register($this);

//parameters of the search
isset($terms)?$searchTerms=$terms:$searchTerms=null;
isset($categoryId)?$searchCategory=$categoryId:$searchCategory=null;

?>
<style>

.fallos-field-description-rep{
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #efeeee;
    border-top: 1px solid #efeeee;
    font-size: .9em;
    font-style: oblique;
        margin-bottom: 10px;
    }

.fallos-title-category-rep{
    margin-left: 10px;
    text-decoration: underline;
    text-align: right;
    }

.fallos-field-title-rep:first-letter {
    text-transform: capitalize;
}

.fallos-field-title-rep{

    display: block;
    padding: 5px;
    border-left: 5px solid;
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 15px;

}

.fallos-title-num-rep{
    display:none;
}
.fallos-field-num-rep{
    font-size: 3em;
    display: block;
    float: right;
}

</style>

<?php echo Html::beginForm(); ?> 

<!--//this will be the content of the stream
//e.g.:
//echo "description: ".[WallEntry object]->description."<br/>";
//of course, you will need to customize the data view to arrange the layout you need
//below fields are auto generated based on th tables available into the system, but data are really rough -->

<?php //echo Html::encode($classifieds->category->categoryName); ?>
<?php

$objUrl=$contentContainer->createUrl('/classifieds/classifieds/object-page', ['object_id' => $classifieds->id ,'searchTerms'=>$searchTerms,'searchCategory'=>$searchCategory]) ;

        //  echo "<div class='fallos-title-category-rep'>".$classifieds->category."</div>";
         echo "<div class='price'>";

             Yii::$app->formatter->locale = 'en-US';

             echo Yii::$app->formatter->asCurrency($classifieds->price, 'USD');

             echo "</div>";

          echo "<div class='fallos-field-title-rep'>".$classifieds->name."</div>";

           echo "<div class='fallos-field-title-rep'>".$classifieds->id."</div>";

          echo "<div class='fallos-title-description-rep'>Description:</div><div class='fallos-field-description-rep'>".$classifieds->description."</div>"; 

            echo "<div class='title-listing-classified'><a href='" .$objUrl. "'><p><b>Details</b></p></a></div>";

?>          

<?php echo Html::endForm(); ?>
Eole211 commented 4 years ago

Hey @redlaguna @Ace2213
It's been a while since I coded this project and I haven't been using HumHub for years...
If you're still using this module and actually make it work 3 years after its development, well, that's great and unexpected.
But I suggest creating a fork because I really don't have the time to maintain it or even to review merge requests correctly.
If you do, let me know : I'll mark this project as deprecated and link to your fork. Cheers.