OSCLASS: Unterschied zwischen den Versionen

Aus Zovis Wikili
Wechseln zu: Navigation, Suche
(Changing between drop-down and autocomplete for locations)
(Zum testen)
 
(15 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
= Zum testen =
 +
== Ad Importer ==
 +
Evt. für eine Importierung in ein neue OSClass Umgebung
 +
 +
https://market.osclass.org/plugins/ad-management/ad-importer_53
 +
 +
 +
== Pre-resize images ==
 +
evt zeigt dieses Plugin die Bilder in der vordefinierten Grösse an und nicht wie das Original. Imageview(Click auf Bild) ist gleich gross wie das Inserate Bild.
 +
 +
https://market.osclass.org/plugins/miscellaneous/pre-resize-images_496
 +
 +
== Theme MCFlY ==
 +
Evt eine schöne Alternative
 +
 +
https://osclassmadhouse.com/portfolio/mcfly-theme/
 +
 
= FAQ =
 
= FAQ =
  
Zeile 8: Zeile 25:
  
 
== welcome Popup Plugin mehrsprachig ==
 
== welcome Popup Plugin mehrsprachig ==
 +
 
in Datei /oc-content/plugins/welcome/user/box.php ändern auf:
 
in Datei /oc-content/plugins/welcome/user/box.php ändern auf:
 +
<pre>
 
  <?php
 
  <?php
 
   $html1 = trim(osc_get_preference('html1', 'plugin-welcome'));
 
   $html1 = trim(osc_get_preference('html1', 'plugin-welcome'));
Zeile 16: Zeile 35:
 
   $html5 = trim(osc_get_preference('html5', 'plugin-welcome'));
 
   $html5 = trim(osc_get_preference('html5', 'plugin-welcome'));
 
  ?>
 
  ?>
 +
 
 +
  <div id="wlc-box">
 +
    <div id="wlc-close"><i class="fa fa-times"></i></div>
 +
 
 +
    <div class="inside">
 +
      <?php if($html1 <> '') { ?><div class="row html1"><?php echo $html1; ?><?php _e('box1', 'welcome'); ?></div><?php } ?>
 +
      <?php if($html2 <> '') { ?><div class="row html2"><?php echo $html2; ?><?php _e('box2', 'welcome'); ?></div><?php } ?>
 +
      <?php if($html3 <> '') { ?><div class="row html3"><?php echo $html3; ?><?php _e('box3', 'welcome'); ?></div><?php } ?>
 +
      <?php if($html4 <> '') { ?><div class="row html4"><?php echo $html4; ?><?php _e('box4', 'welcome'); ?></div><?php } ?>
 +
      <?php if($html5 <> '') { ?><div class="row html5"><?php echo $html5; ?><?php _e('box5', 'welcome'); ?></div><?php } ?>
 +
    </div>
 +
  </div>
 
   
 
   
  <div id="wlc-box">
+
  <div id="wlc-cover">&nbsp;</div>
  <div id="wlc-close"><i class="fa fa-times"></i></div>
+
</pre>
 
  <div class="inside">
 
    <?php if($html1 <> '') { ?><div class="row html1"><?php echo $html1; ?><?php _e('box1', 'welcome'); ?></div><?php } ?>
 
    <?php if($html2 <> '') { ?><div class="row html2"><?php echo $html2; ?><?php _e('box2', 'welcome'); ?></div><?php } ?>
 
    <?php if($html3 <> '') { ?><div class="row html3"><?php echo $html3; ?><?php _e('box3', 'welcome'); ?></div><?php } ?>
 
    <?php if($html4 <> '') { ?><div class="row html4"><?php echo $html4; ?><?php _e('box4', 'welcome'); ?></div><?php } ?>
 
    <?php if($html5 <> '') { ?><div class="row html5"><?php echo $html5; ?><?php _e('box5', 'welcome'); ?></div><?php } ?>
 
  </div>
 
</div>
 
  
<div id="wlc-cover">&nbsp;</div>
+
Sprachdateien anlegen mit neuen Sprachfeldern:
 +
<pre>
 +
#: box.php:13
 +
msgid "box1"
 +
msgstr "<img src=\"/oc-content/plugins/welcome/img/neuico.png\"/>"
  
Sprachdateien anlegen mit neuen Sprachfeldern:
+
#: box.php:14
 +
msgid "box2"
 +
msgstr ""
  
#: index.php:143
+
#: box.php:15
msgid "Contact Us"
+
msgid "box3"
msgstr ""
+
msgstr "Ab sofort sind die Inserate für Ersatzteile gratis aufschaltbar!"
 
#: box.php:13
 
msgid "box1"
 
msgstr "<img src=\"/oc-content/plugins/welcome/img/neuico.png\"/>"
 
 
#: box.php:14
 
msgid "box2"
 
msgstr ""
 
 
#: box.php:15
 
msgid "box3"
 
msgstr "Ab sofort sind die Inserate für Ersatzteile gratis aufschaltbar!"
 
 
#: box.php:16
 
msgid "box4"
 
msgstr ""
 
"<b>Jetzt neu:</b><br><div style=' text-align: left; float:right; position:relative; right:50%; ' ><p style=' position:"
 
"relative; left:50%; ' >* Ersatzteile gratis inserieren<br>* Fahrzeuge nur CHF 10.- pro Jahr<br>* 15 Fotos je Inserat</"
 
"p></div>"
 
 
#: box.php:17
 
msgid "box5"
 
msgstr ""
 
"Bei uns läuft Ihr Inserat nicht sofort ab. Nach einem Jahr kann das Inserat einfach verlängert werden.<br>\n"
 
"<a href=\"/user/register\">zum Registrieren</a><br>\n"
 
"\n"
 
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/en_US\"><img src=\"/oc-"
 
"content/themes/zara/images/country_flags/us.png\"/></a>\n"
 
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/fr_FR\"><img src=\"/oc-"
 
"content/themes/zara/images/country_flags/fr.png\"/></a>\n"
 
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/it_IT\"><img src=\"/oc-"
 
"content/themes/zara/images/country_flags/it.png\"/></a>"
 
  
Und dann noch im Backend in den Boxen die Text anzeigen sollen ein Geschütztes Leerzeichen einfügen:
+
#: box.php:16
&nbsp;
+
msgid "box4"
 +
msgstr ""
 +
"<b>Jetzt neu:</b><br>\n"
 +
"<div style=' text-align: left; float:right; position:relative; right:50%; ' >\n"
 +
"<ul style=' position:relative; left:50%; list-style:disc '>\n"
 +
"<li>Ersatzteile gratis inserieren</li>\n"
 +
"<li>Fahrzeuge nur CHF 10.- pro Jahr</li>\n"
 +
"<li>15 Fotos je Inserat</li>\n"
 +
"</ul>\n"
 +
"</div>"
  
 +
#: box.php:17
 +
msgid "box5"
 +
msgstr ""
 +
"Bei uns läuft Ihr Inserat nicht sofort ab. Nach einem Jahr kann das Inserat einfach verlängert werden.<br>\n"
 +
"<a href=\"/user/register\">zum Registrieren</a><br>\n"
 +
"\n"
 +
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/en_US\"><img src=\"/oc-"
 +
"content/themes/zara/images/country_flags/us.png\"/></a>\n"
 +
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/fr_FR\"><img src=\"/oc-"
 +
"content/themes/zara/images/country_flags/fr.png\"/></a>\n"
 +
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/it_IT\"><img src=\"/oc-"
 +
"content/themes/zara/images/country_flags/it.png\"/></a>"
 +
</pre>
  
 +
Und dann noch im Backend in den Boxen die Text anzeigen sollen ein Geschütztes Leerzeichen einfügen:
 +
&amp;nbsp;
 +
<br><br><br>
  
 
== Changing between drop-down and autocomplete for locations ==
 
== Changing between drop-down and autocomplete for locations ==

Aktuelle Version vom 18. Februar 2019, 11:51 Uhr

Zum testen

Ad Importer

Evt. für eine Importierung in ein neue OSClass Umgebung

https://market.osclass.org/plugins/ad-management/ad-importer_53


Pre-resize images

evt zeigt dieses Plugin die Bilder in der vordefinierten Grösse an und nicht wie das Original. Imageview(Click auf Bild) ist gleich gross wie das Inserate Bild.

https://market.osclass.org/plugins/miscellaneous/pre-resize-images_496

Theme MCFlY

Evt eine schöne Alternative

https://osclassmadhouse.com/portfolio/mcfly-theme/

FAQ

welcome Popup Plugin mehrsprachig

in Datei /oc-content/plugins/welcome/user/box.php ändern auf:

 <?php
   $html1 = trim(osc_get_preference('html1', 'plugin-welcome'));
   $html2 = trim(osc_get_preference('html2', 'plugin-welcome'));
   $html3 = trim(osc_get_preference('html3', 'plugin-welcome'));
   $html4 = trim(osc_get_preference('html4', 'plugin-welcome'));
   $html5 = trim(osc_get_preference('html5', 'plugin-welcome'));
 ?>
  
  <div id="wlc-box">
    <div id="wlc-close"><i class="fa fa-times"></i></div>
  
    <div class="inside">
      <?php if($html1 <> '') { ?><div class="row html1"><?php echo $html1; ?><?php _e('box1', 'welcome'); ?></div><?php } ?>
      <?php if($html2 <> '') { ?><div class="row html2"><?php echo $html2; ?><?php _e('box2', 'welcome'); ?></div><?php } ?>
      <?php if($html3 <> '') { ?><div class="row html3"><?php echo $html3; ?><?php _e('box3', 'welcome'); ?></div><?php } ?>
      <?php if($html4 <> '') { ?><div class="row html4"><?php echo $html4; ?><?php _e('box4', 'welcome'); ?></div><?php } ?>
      <?php if($html5 <> '') { ?><div class="row html5"><?php echo $html5; ?><?php _e('box5', 'welcome'); ?></div><?php } ?>
    </div>
  </div>
 
 <div id="wlc-cover"> </div>

Sprachdateien anlegen mit neuen Sprachfeldern:

#: box.php:13
msgid "box1"
msgstr "<img src=\"/oc-content/plugins/welcome/img/neuico.png\"/>"

#: box.php:14
msgid "box2"
msgstr ""

#: box.php:15
msgid "box3"
msgstr "Ab sofort sind die Inserate für Ersatzteile gratis aufschaltbar!"

#: box.php:16
msgid "box4"
msgstr ""
"<b>Jetzt neu:</b><br>\n"
"<div style=' text-align: left; float:right; position:relative; right:50%; ' >\n"
"<ul style=' position:relative; left:50%; list-style:disc '>\n"
"<li>Ersatzteile gratis inserieren</li>\n"
"<li>Fahrzeuge nur CHF 10.- pro Jahr</li>\n"
"<li>15 Fotos je Inserat</li>\n"
"</ul>\n"
"</div>"

#: box.php:17
msgid "box5"
msgstr ""
"Bei uns läuft Ihr Inserat nicht sofort ab. Nach einem Jahr kann das Inserat einfach verlängert werden.<br>\n"
"<a href=\"/user/register\">zum Registrieren</a><br>\n"
"\n"
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/en_US\"><img src=\"/oc-"
"content/themes/zara/images/country_flags/us.png\"/></a>\n"
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/fr_FR\"><img src=\"/oc-"
"content/themes/zara/images/country_flags/fr.png\"/></a>\n"
"<a id=\"containerd\" style=\" background: white; margin:0; padding:0px 15px;\" href=\"/language/it_IT\"><img src=\"/oc-"
"content/themes/zara/images/country_flags/it.png\"/></a>"

Und dann noch im Backend in den Boxen die Text anzeigen sollen ein Geschütztes Leerzeichen einfügen:

&nbsp;




Changing between drop-down and autocomplete for locations

https://doc.osclass.org/Changing_between_drop-down_and_autocomplete_for_locations

Redirect after login

/ oc-includes / osclass / controller / login.php Zeile 102

					/* ad by zovi - Redirect after login --------------------------------------------------------------
										$url_redirect = osc_get_http_referer();
										*/
										$url_redirect = osc_user_dashboard_url();
										



Redirect Facebook Plugin

/ oc-content / plugins / facebook_login / functions.php

    // Flash messages
    if($code == 0) {
      osc_add_flash_error_message(__('This account does not exist.', 'facebook_login'));
    } else if ($code == 1) {
      osc_add_flash_error_message(__('This account has not been activated.', 'facebook_login'));
    } else if ($code == 2) {
      osc_add_flash_error_message(__('This account has been blocked.', 'facebook_login'));
    } else if ($code == 3) {
      osc_add_flash_ok_message(__('You have been successfully logged in.', 'facebook_login'));
    }
	  /* ad by zovi - Redirect after login to dashboard =====================================================================
          header('Location: ' . osc_base_url());
	  */
	  header('Location:' . osc_user_profile_url());
	  
    exit;
  }
}

Redirect Google Connect Plugin

/ oc-content / plugins / google_connect / connect.php

      // Flash messages
      if($login_code == 0) {
        osc_add_flash_error_message(__('This account does not exist.', 'google_connect'));
      } else if ($login_code == 1) {
        osc_add_flash_error_message(__('This account has not been activated.', 'google_connect'));
      } else if ($login_code == 2) {
        osc_add_flash_error_message(__('This account has been blocked.', 'google_connect'));
      } else if ($login_code == 3) {
        osc_add_flash_ok_message(__('You have been successfully logged in.', 'google_connect'));
      }

      /* ad by zovi - Redirect after login to dashboard =====================================================================
          header('Location: ' . filter_var($google_redirect_url, FILTER_SANITIZE_URL));
      */
          header('Location:' . osc_user_profile_url());
          exit;
    }
  }

How do I hide/remove empty sub-categories on main page?

Info:

https://forums.mb-themes.com/zara-osclass-responsive-theme/how-do-i-hideremove-empty-sub-categories-on-main-page/

/ oc-content / themes / zara / inc.category.php


              <?php if(!empty($subcats)) { ?>
                <?php foreach($subcats as $s) { ?>
                  <?php $search_params['sCategory'] = $s['pk_i_id']; ?>

                  <div class="link-wrap">
                    <a href="<?php echo osc_search_url($search_params); ?>" <?php echo ($s['pk_i_id'] == $search_cat_id ? 'class="bold"' : ''); ?>>
                      <?php echo $s['s_name'] . ' <strong>' . $s['i_num_items'] . '</strong>'; ?>
                    </a>
                  </div>

                <?php } ?>
              <?php } ?>


nach:

		<!-- add by zovi - hide empty subcategories =================================================== -->
		  <?php if($s['i_num_items'] > 0) { ?>

                  <div class="link-wrap">
                    <a href="<?php echo osc_search_url($search_params); ?>" <?php echo ($s['pk_i_id'] == $search_cat_id ? 'class="bold"' : ''); ?>>
                      <?php echo $s['s_name'] . ' <strong>' . $s['i_num_items'] . '</strong>'; ?>
                    </a>
                  </div>

                  <!-- add by zovi - hide empty subcategories =================================================== -->
		  <?php } ?>

                <?php } ?>
              <?php } ?>

Plugin Watchlist

Einfügen in / oc-content / themes / zara / item.php

            <div class="map">
              <?php osc_run_hook('location') ; ?>
            </div>
          </div> 
				
			
	  <!-- add by zovi - Watchlist ========================================================================= -->  
	  <div id="location">
            <h2 class="sc-click">
              <div class="left"><i class="fa fa-heart"></i></div>
              <?php watchlist(); ?>
            </h2>
	  </div>
          <!-- end by zovi - Watchlist ========================================================================= -->


        </div>
	  

        <!-- CONTACT SELLER OPTIONS - MOBILE VIEW -->
        <div class="contact-options-resp resp is767">
          <!-- CLICK TO CALL BUTTON -->


und in / oc-content / plugins / watchlist / watchlist_route.php


                    <div id="list_head"></div>
                    <table border="0" cellspacing="0">
                        <tbody>
                            <?php $class = "even"; ?>
                            <?php while (osc_has_items()) {
                                $url_delete = osc_route_url('watchlist-delete', array('delete' => osc_item_id()));  ?>
                                <tr class="<?php echo $class; ?>">
                                    <?php if (osc_images_enabled_at_items()) { ?>
                                    <td class="photo">
                                    	<?php if (osc_count_item_resources()) { ?>
                                        	
											
											
										<!-- change by zovi ============================================================
												<a href="<?php echo osc_item_url(); ?>"><img src="<?php echo osc_resource_thumbnail_url(); ?>" width="75px" height="56px" title="" alt="" /></a> -->
										<div id="list-view">
											<div class="list-prod">
												<div class="middle">
													<a href="<?php echo osc_item_url(); ?>">
														<img src="<?php echo osc_resource_thumbnail_url(); ?>" width="150px"  title="" alt="" />
													</a>
												</div>
											</div>
										</div>
										<!-- end change by zovi ============================================================ -->	
											
                                            <?php } else { ?>
                                                <img src="<?php echo osc_current_web_theme_url('images/no_photo.gif'); ?>" title="" alt="" />
                                            <?php } ?>
                                        </td>
                                    <?php } ?>
                                    	<!-- change by zovi ============================================================ -->
										<td class="text">
											<div id="list-view">
												<div class="list-prod">
													<div class="middle">
														<h3>
															<a href="<?php echo osc_item_url(); ?>"><?php echo osc_item_title(); ?></a>
														</h3>
														<p>
															<strong><?php if (osc_price_enabled_at_items()) {
                            echo osc_item_formated_price(); ?> - <?php } echo osc_item_city(); ?> (<?php echo osc_item_region(); ?>) - <?php echo osc_format_date(osc_item_pub_date()); ?></strong>
														</p>
														<p><?php echo osc_highlight(strip_tags(osc_item_description())); ?></p>
														<p align="right">
															<a class="delete" onclick="javascript:return confirm('<?php _e('This action can not be undone. Are you sure you want to continue?', 'watchlist'); ?>')" href="<?php echo $url_delete; ?>" ><?php _e('Delete', 'watchlist'); ?>
															</a>
														<p>
													</div>
												</div>
											</div>
											<!-- end change by zovi ============================================================ -->
										
                                    	</td>
                                 	</tr>
                                    <?php $class = ($class == 'even') ? 'odd' : 'even'; ?>

Plugin Socialconnect - Picture Network Unlink

/ oc-content / plugins / socialconnect / user / manage.php


<?php _e('Picture', 'socialconnect'); ?> <?php _e('Network', 'socialconnect'); ?> <?php _e('Unlink', 'socialconnect'); ?>




Plugin Raiting

CSS Mod

Farb- und Buttongrösse ändern in / oc-content / plugins / user_rating / css / user.css

/* edit by zovi - Button rating smaler- orig:
.ur-button.add-new-rating, .ur-button.show-rating {float:left;text-decoration:none;line-height:14px;display:inline-block;margin:10px 15px 10px 0;width:auto;border-radius:3px;padding:18px 15px;height:52px;display:inline-block;} */

.ur-button.add-new-rating, .ur-button.show-rating {float:center;text-decoration:none;line-height:10px;display:inline-block;margin:0px 0px 0px 0px;width:auto;border-radius:3px;padding:3px 15px;height:20px;}



/* edit by zovi */
/*.show-rating.show-stars {float:left;line-height:21px;display:inline-block;margin:10px 15px 10px 0;padding:16px 8px;height:52px;}*/
.show-rating.show-stars {float:center;line-height:21px;display:inline-block;margin:10px 15px 10px 0;padding:16px 8px;height:2px;width:200px;}


/* SHOW RATING STARS */

/* edit by zovi */
/*
.show-rating.show-stars i {font-size:18px;display:inline-block;margin-right:1px;line-height:18px;text-decoration:none;}
.show-rating.show-stars:hover i {opacity:0.8;}
.show-rating.show-stars span {font-size:11px;font-weight:600;padding-left:5px;display:inline-block;color:#333;text-decoration:none;line-height:18px;}
.mb-total-zero {display:inline-block;width:100%;background:#f8f8f8;padding:25px 10px;text-align:center;font-size:13px;color:#aaa;line-height:18px;}
*/

.show-rating.show-stars i {font-size:18px;display:inline-block;margin-right:1px;line-height:18px;text-decoration:none;}
.show-rating.show-stars:hover i {opacity:0.8;}
.show-rating.show-stars span {font-size:11px;font-weight:600;padding-left:5px;display:inline-block;color:#333;text-decoration:none;line-height:18px;}
.mb-total-zero {display:inline-block;width:100%;background:#f8f8f8;padding:25px 10px;text-align:center;font-size:13px;color:#aaa;line-height:18px;}



raiting.php Mod add Stars

File / oc-content / plugins / user_rating / user / rating.php ganz unten vor dem letzten < /DIV> mit folgendem bestücken:

 <!-- add by zovi -->
  <center><?php if(function_exists('ur_add_rating_link')) { echo ur_add_rating_link(); } ?></center><br><button type="button" class="ur-button ur-close" id="ok-button"><?php _e('Ok', 'user_rating'); ?></button>

sieht dan so aus:

          <?php } ?>
        </div>
      <?php } ?>
    </div>

  <?php } ?>
  <!-- add by zovi -->
  <center><?php if(function_exists('ur_add_rating_link')) { echo ur_add_rating_link(); } ?></center><br><button type="button" class="ur-button ur-close" id="ok-button"><?php _e('Ok', 'user_rating'); ?></button>
										   
</div>

user-public-profile.php Mod add Stars

File / oc-content / themes / zara / user-public-profile.php in der Mitte mit folgendem bestücken:


        <?php if(function_exists('profile_picture_show')) { profile_picture_show(200); } ?>

        <ul id="user_data">
			
			
			<!-- ad by zovi - Raiting -->
			<?php if(function_exists('ur_show_rating_stars')) { echo ur_show_rating_stars(); } ?><br>
			
			
			
			
          <li class="name"><?php echo osc_user_name(); ?></li>
          <?php if ( osc_user_phone_mobile() != "" ) { ?><li><span class="left"><?php _e('Mobile', 'zara'); ?></span><span class="right"><?php echo osc_user_phone_mobile() ; ?></span></li><?php } ?>

Add Raiting Stars

File / oc-content / themes / zara / item.php leicht unter der Mitte mit folgendem bestücken:

                  <?php } else { ?>
                    <?php echo __('Unregistered user', 'zara'); ?>
                  <?php } ?>
					
					
					
									<!-- Add by zovi - Add Raiting Stars  -->
				<br>
				<?php if(function_exists('ur_show_rating_stars')) { echo ur_show_rating_stars(); } ?>
			<!--	<?php if(function_exists('ur_add_rating_link')) { echo ur_add_rating_link(); } ?>-->
                </div>

				

				<div id="plugin-details">
                  <?php osc_run_hook('item_detail', osc_item() ); ?>
                </div>

Plugin related_ads

VERALTET - braucht es nicht mehr - sprache ändern

Code ersetzen in / oc-content / plugins / related_ads / related_ads.php

von

<div class="related_ads">         
    
	<h2><strong>Related Ads</strong></h2>
	    <?php if( osc_count_items() == 0) { ?>
		<p class="empty">No related Ads</p>
	    <?php } else { ?>
		<table border="0" cellspacing="0">
		    <tbody>


nach

<div class="related_ads">         
    
	<h2><strong><?php _e('3. How can I show related ads with pictures only?', 'related_ads'); ?></strong></h2>
	    <?php if( osc_count_items() == 0) { ?>
		<p class="empty"><?php _e('2.How does Related Ads plugin work?', 'related_ads'); ?></p>
	    <?php } else { ?>
		<table border="0" cellspacing="0">
		    <tbody>


dann noch die Übersetzung machen für en_EN und alle anderen Sprachen!

"3. How can I show related ads with pictures only?" -> Ähnliche Inserate
"2.How does Related Ads plugin work?" -> Keine ähnlichen Inserate gefunden

VERALTET - braucht es nicht mehr - CSS Anpassungen

Einstellungen im Plugin "Related Ads" im Adminpanel: Disable default Css -> No


In / oc-content / plugins / related_ads / style.css

Folgendes hinzufügen:

/* add by Zovi - Bilder vergrössern */
.related_ads img { text-align:center;width:100%;height:100%;}
.related_ads table td.text p { line-height:16px; }
.related_ads table td.price { padding-left:25px; }
.related_ads .see_more_link { font-size:14px; padding:15px 20px 0; text-align:right;}
/* add by Zovi - Bilder vergrössern */
.related_ads img { text-align:center;width:100%;height:100%;}

Suche über Inserate mit allen Sprachen

Infos von:


Now there's new versions for "multilanguage search" only:

https://forums.osclass.org/3-5-x/search-problem-oc-3-5-3/msg113711/#msg113711 (5th version).


And "multilanguage search with sorting by relevance":

https://forums.osclass.org/3-5-x/search-problem-oc-3-5-3/msg113778/#msg113778 (10th version).



Add this at the very bottom of your theme functions.php:

Notes: (10th version).

1.- Take care not to leave blank lines after this.

2.- If your theme functions.php doesn't end with ?> skip first line of my code.

10th version (Alerts compatible, Multilanguage on User Alerts), no Sorting by relevance on See By Price, Compatibility with other possible custom JOINS, ignore duplicates, fixed problem with page language changing and other bugs


<?php
// add by zovi - version 10
function cust_refined_pattern_search($params) {
    if (@$params['sPattern'] != '') {
        $mSearch = Search::newInstance();
        $query_elements = (array) json_decode($mSearch->toJson());
        
        $mSearch->addLocale('%');
        $mSearch->addGroupBy(DB_TABLE_PREFIX.'t_item.pk_i_id');
        if (@$params['sOrder'] != 'i_price') {
            $mSearch->addJoinTable(count($query_elements['tables_join']), sprintf("(SELECT fk_i_item_id, MATCH(s_title, s_description) AGAINST('%s') AS relevance FROM %st_item_description) des", $params['sPattern'], DB_TABLE_PREFIX), 'des.fk_i_item_id = '.DB_TABLE_PREFIX.'t_item.pk_i_id', 'INNER' );
            $mSearch->order("des.relevance DESC, dt_pub_date", "DESC");
        }        
    }
}

osc_add_hook('search_conditions', 'cust_refined_pattern_search');

function cust_alerts_user_dashboard() {
    if (Params::getParam('page') == "user" && Params::getParam('action') == "alerts") {
        $webUser = new CWebUser;

        $aAlerts = Alerts::newInstance()->findByUser( Session::newInstance()->_get('userId'), false );
        $user = User::newInstance()->findByPrimaryKey( Session::newInstance()->_get('userId'));
        foreach($aAlerts as $k => $a) {
            $array_conditions   = (array)json_decode($a['s_search']);

            $search = new Search();
            $search->setJsonAlert($array_conditions);
            if (osc_version() > 361) $search->notFromUser(Session::newInstance()->_get('userId'));
            $search->addLocale('%');
            $search->addGroupBy(DB_TABLE_PREFIX.'t_item.pk_i_id');
            $search->limit(0, 3);

            $aAlerts[$k]['items'] = $search->doSearch();
        }

        $webUser->_exportVariableToView('alerts', $aAlerts);
        View::newInstance()->_reset('alerts');
        $webUser->_exportVariableToView('user', $user);
    }
}

osc_add_hook('before_html', 'cust_alerts_user_dashboard');
?>

Zara Theme

VERALTET - braucht es nicht mehr - füge Text im Footer ein mit Languageswitcher

In der Sprachdatei nach folgendem suchen: ___I want to help OSClass___

Dann je nach Sprache folgendes übersetzen:

Oldtimerersatzteile.ch übernimmt keine Verantwortung für den Inhalt der Inserate.
Oldtimerersatzteile.ch assumes no responsibility for the content of the advertisements.
Oldtimerersatzteile.ch n'assume aucune responsabilité pour le contenu des publicités.
Oldtimerersatzteile.ch non si assume alcuna responsabilità per il contenuto degli annunci pubblicitari.


Und im / oc-content / themes / zara / footer.php (fast zu oberst) folgendes einfügen:

<?php if(zara_current('zc_footer') == 1) { ?>
  <div id="footer-new">
	  
	  <!-- add "Oldtimerersatzteile.ch übernimmt keine Verantwortung für den Inhalt der Inserate." by zovi -->
	  <center><?php _e('I want to help OSClass & MB themes by linking to <a href="http://osclass.org/" target="_blank">osclass.org</a> and <a href="http://www.mb-themes.com" target="_blank">MB-Themes.com</a> from my site', 'zara'); ?>
	  </center>
	  
	  
    <div class="inside">
      <div class="bottom-place">
        <?php if(osc_is_search_page()) { ?>

VERALTET - braucht es nicht mehr - Remove Link "Premium osclass themes and plugins"

finde

<?php osc_run_hook('footer') ; ?>

im File / oc-content / themes / zara / footer.php und kommentier es aus (nicht löschen!)

<!-- remove Premiumlink by zovi - to enable delete every "1"  -->
<?php osc_run_hook('footer11111111111111111111111') ; ?>

AGBs Terms

Code anpassen in / oc-content / plugins / terms / index.php

if (osc_get_preference('include', 'terms') == '0') {

    //manual include changed by zovi
    function terms_manual_include() {
        $value_sesion = '';
        if (Session::newInstance()->_getForm('terms') != '') {
            $value_sesion = Session::newInstance()->_getForm('terms');
        }
        ?>
        <div class="row">
            <label></label>
            <input type="checkbox" name="terms_box" id="terms_box" style="display: block; margin-left: auto; margin-right: auto; width: 80px;" <?php
            if ($value_sesion != '') {
                echo 'checked="yes"';
            }
            ?> value="1"/>
			<span style="display: block; margin-left: auto; margin-right: auto; width: 300px;text-align: center;">
					<?php printf(__('I agree with these <a target="_blank" href="%s">terms and conditions</a>', 'terms'), osc_get_preference('terms_page', 'terms')); ?>
			</span>
        </div>
        <?php
    }

}

und noch im / themes / zara / item-post.php

        <!-- PLUGIN HOOKS -->
        <div id="post-hooks">
          <h2><?php _e('Additional details', 'zara'); ?></h2>

          <?php ItemForm::plugin_post_item(); ?>
        </div>
      </div>

	  <!-- AGB Terms Manual by zovi -->
	  <?php if(function_exists('terms_manual_include')){ terms_manual_include();} ?>
		  
		  
      <?php if(osc_recaptcha_public_key() <> '') { ?>
        <div class="box">
          <div class="row">
            <?php osc_show_recaptcha(); ?>

VERALTET - braucht es nicht mehr - Stella Theme

Google connect

If you have set up everything and you still has problem that after click on login button, you are redirected back to homepage with no result, place following code into first line of your head.php:

<div style="display:none;"><?php gc_login_button(); ?></div>

eigenes css

eigenes css in css folder von stella erstellen/kopieren und anschliessend im ***head.php*** den Pfad ändern:

von

 <?php
 osc_enqueue_style('style', osc_current_web_theme_url('css/style.css?v=' . date('YmdHis')));
 osc_enqueue_style('fancy', osc_current_web_theme_js_url('fancybox/jquery.fancybox.css'));

nach

 <?php
 osc_enqueue_style('style', osc_current_web_theme_url('css/style_zovi.css?v=' . date('YmdHis')));
 osc_enqueue_style('fancy', osc_current_web_theme_js_url('fancybox/jquery.fancybox.css'));

Republish Button

Um einen Republish (Wiederveröffentlichen) Button im Menü Expired (Abgelaufen) einzufügen folgendes in / oc-content / themes / stela / user-items.php einfügen:

                  <?php if(function_exists('republish_link_raw') && republish_link_raw(osc_item_id())) { ?>
                    <a class="republish round2 tr1" href="<?php echo republish_link_raw(osc_item_id()); ?>" rel="nofollow"><?php _e('Republish', 'stela'); ?></a>
 		  <?php } ?>
 
  achtung nur Quellcode kopieren!
					<!--   republish  by zovi -->					
 					<a class="republish round2 tr1" href="<?php echo osc_base_url(true); ?>?page=custom&route=osp-cart-update&product=601x1x<?php echo osc_item_id(); ?>x8760x1" rel="nofollow"><i class="fa fa-refresh"></i> <?php _e('Republish', 'stela'); ?></a>
 					<!--   end  by zovi -->	
 
 
                </div>

Plugin Osclass-pay

Republish Gebühr einstellen

Um ein Inserat für 5.- ein Jahr zu erneuern braucht es eine Gebühr von 0.2617 CHF pro 24h (zeigt nur 0.3 CHF an nach speichern!)

Wird in folgender Seite eingestellt. Adminpanel - Plugins - Osclass Pay Plugin - Item - Pay for Republish



Um ein Inserat für 2 Monate für 3.- als Premium zu lancieren, braucht es eine Gebühr von 0.3839 CHF pro 24h (zeigt nur 0.4 CHF an nach speichern!)

Wird in folgender Seite eingestellt. Adminpanel - Plugins - Osclass Pay Plugin - Item - Mark as Premium

Fehler in der Spracheumschaltung der Kategorien

Bei mehrsprachigen Osclass Seiten werden die kategorien nicht übersetzt.


Hier die Lösung:

This is a pretty serious Osclass bug that I studied and solved a while ago (but the solution involves changing a core file, so I pulled an official request, no answer so far... :()

You need to backup your oc-includes/osclass/model/Category.php file (just in case) and replace its contents with this:

https://raw.githubusercontent.com/teseo-2014/Osclass-develop/develop/oc-includes/osclass/model/Category.php

Now, being a core file, remember that you need to redo this modification every time you upgrade Osclass (unless they solve this once and for all).

Regards


Source https://forums.osclass.org/themes/how-to-translate-osclass-themes/msg125953/#msg125953

Fehler im GUM Theme

Die Seite "payment-pro-user-menu" wird im Useraccount nicht angezeigt

In der Datei /oc-content/themes/gum/class/payments_pro/user/menu.php auf der linie 91 ist ein (') am falschen Ort.

ändere

printf('<li><a class="searchPaginationSelected" href="%s">%d</a>'</li>,

nach

printf('<li><a class="searchPaginationSelected" href="%s">%d</a></li>',

und schon klappts wieder.



Debug einschalten

/**
  * Copy this code to config.php file
  * This will log all error notices and warnings to a file called debug.log in oc-content
  */
 define('OSC_DEBUG', true) ;
 define('OSC_DEBUG_LOG', true) ;

Wörter in Sprachen ändern

https://forums.osclass.org/repurpose/help-with-free-classifieds-osclass-script-35679/msg149455/#msg149455

Tip:
Es gibt Übersetzungen im Standard Verzeichnis
/oc-content/languages


In den meisten Fällen gibt es sie auch noch in den Themes:
/oc-content/themes/[themenname]/languages/

z.B.:
/oc-content/themes/osclasswizards/languages/


Plugins


Themes