|  | @@ -211,6 +211,8 @@ MICROBLOG_MARKDOWN_COMMIT='03c53942f94b3376f0946e6e1fe566cc21ccf232'
 | 
	
		
			
			| 211 | 211 |  # Sharings plugin for the microblog
 | 
	
		
			
			| 212 | 212 |  SHARINGS_REPO="http://git.lasindias.club/bashrc/Sharings"
 | 
	
		
			
			| 213 | 213 |  SHARINGS_COMMIT='d5c6c7f855d9afff9086c09ea706f38c859bc0d4'
 | 
	
		
			
			|  | 214 | +SHARINGS_THEME_REPO="http://git.lasindias.club/manuel/SharingsTheme"
 | 
	
		
			
			|  | 215 | +SHARINGS_THEME_COMMIT='7106c7ef03'
 | 
	
		
			
			| 214 | 216 |  
 | 
	
		
			
			| 215 | 217 |  # Domain name for hubzilla installation
 | 
	
		
			
			| 216 | 218 |  HUBZILLA_DOMAIN_NAME=
 | 
	
	
		
			
			|  | @@ -8773,6 +8775,54 @@ function install_gnu_social_plugin_sharings {
 | 
	
		
			
			| 8773 | 8775 |  	echo 'install_gnu_social_plugin_sharings' >> $COMPLETION_FILE
 | 
	
		
			
			| 8774 | 8776 |  }
 | 
	
		
			
			| 8775 | 8777 |  
 | 
	
		
			
			|  | 8778 | +function install_gnu_social_plugin_sharings_theme {
 | 
	
		
			
			|  | 8779 | +x   if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
 | 
	
		
			
			|  | 8780 | +		return
 | 
	
		
			
			|  | 8781 | +	fi
 | 
	
		
			
			|  | 8782 | +
 | 
	
		
			
			|  | 8783 | +	if [ ! -d /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins ]; then
 | 
	
		
			
			|  | 8784 | +		echo $'No local/plugins directory found for the microblog'
 | 
	
		
			
			|  | 8785 | +		exit 74458
 | 
	
		
			
			|  | 8786 | +	fi
 | 
	
		
			
			|  | 8787 | +
 | 
	
		
			
			|  | 8788 | +	# update to the next commit
 | 
	
		
			
			|  | 8789 | +	set_repo_commit /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins "GNU Social sharings theme plugin commit" "$SHARINGS_THEME_COMMIT" $SHARINGS_THEME_REPO
 | 
	
		
			
			|  | 8790 | +
 | 
	
		
			
			|  | 8791 | +	if grep -Fxq "install_gnu_social_plugin_sharings_theme" $COMPLETION_FILE; then
 | 
	
		
			
			|  | 8792 | +		return
 | 
	
		
			
			|  | 8793 | +	fi
 | 
	
		
			
			|  | 8794 | +
 | 
	
		
			
			|  | 8795 | +	cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins
 | 
	
		
			
			|  | 8796 | +	git_clone $SHARINGS_THEME_REPO SharingsTheme
 | 
	
		
			
			|  | 8797 | +	if [ ! -d /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/SharingsTheme ]; then
 | 
	
		
			
			|  | 8798 | +		echo $'Unable to clone microblog sharings plugin theme'
 | 
	
		
			
			|  | 8799 | +		exit 639253
 | 
	
		
			
			|  | 8800 | +	fi
 | 
	
		
			
			|  | 8801 | +
 | 
	
		
			
			|  | 8802 | +	cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/local/plugins/SharingsTheme
 | 
	
		
			
			|  | 8803 | +	git stash
 | 
	
		
			
			|  | 8804 | +	git checkout master
 | 
	
		
			
			|  | 8805 | +	git branch -D $SHARINGS_THEME_COMMIT
 | 
	
		
			
			|  | 8806 | +	git checkout $SHARINGS_THEME_COMMIT -b $SHARINGS_THEME_COMMIT
 | 
	
		
			
			|  | 8807 | +
 | 
	
		
			
			|  | 8808 | +	# enable the plugin
 | 
	
		
			
			|  | 8809 | +	if ! grep -q "addPlugin('SharingsTheme');" /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php; then
 | 
	
		
			
			|  | 8810 | +		echo "addPlugin('SharingsTheme');" >> /var/www/$MICROBLOG_DOMAIN_NAME/htdocs/config.php
 | 
	
		
			
			|  | 8811 | +	fi
 | 
	
		
			
			|  | 8812 | +
 | 
	
		
			
			|  | 8813 | +	cd /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
 | 
	
		
			
			|  | 8814 | +	php scripts/checkschema.php
 | 
	
		
			
			|  | 8815 | +
 | 
	
		
			
			|  | 8816 | +	chown -R www-data:www-data /var/www/$MICROBLOG_DOMAIN_NAME/htdocs
 | 
	
		
			
			|  | 8817 | +
 | 
	
		
			
			|  | 8818 | +	if ! grep -q "GNU Social sharings plugin theme commit" $COMPLETION_FILE; then
 | 
	
		
			
			|  | 8819 | +		echo "GNU Social sharings plugin theme commit:$SHARINGS_THEME_COMMIT" >> $COMPLETION_FILE
 | 
	
		
			
			|  | 8820 | +	else
 | 
	
		
			
			|  | 8821 | +		sed -i "s|GNU Social sharings plugin theme commit.*|GNU Social sharings plugin theme commit:$SHARINGS_THEME_COMMIT|g" $COMPLETION_FILE
 | 
	
		
			
			|  | 8822 | +	fi
 | 
	
		
			
			|  | 8823 | +	echo 'install_gnu_social_plugin_theme_sharings' >> $COMPLETION_FILE
 | 
	
		
			
			|  | 8824 | +}
 | 
	
		
			
			|  | 8825 | +
 | 
	
		
			
			| 8776 | 8826 |  function expire_gnu_social_posts {
 | 
	
		
			
			| 8777 | 8827 |  	# To prevent the database size from growing endlessly this script expires posts
 | 
	
		
			
			| 8778 | 8828 |  	# after a number of months
 | 
	
	
		
			
			|  | @@ -11029,6 +11079,7 @@ expire_gnu_social_posts
 | 
	
		
			
			| 11029 | 11079 |  install_gnu_social_theme
 | 
	
		
			
			| 11030 | 11080 |  install_gnu_social_markdown
 | 
	
		
			
			| 11031 | 11081 |  install_gnu_social_plugin_sharings
 | 
	
		
			
			|  | 11082 | +install_gnu_social_plugin_sharings_theme
 | 
	
		
			
			| 11032 | 11083 |  install_rss_reader
 | 
	
		
			
			| 11033 | 11084 |  install_rss_reader_gnusocial
 | 
	
		
			
			| 11034 | 11085 |  install_rss_mobile_reader
 |