Jump to content

Photo
- - - - -

Profile Questions, Specific questions

profile questions social engine 4 profile questions profile question specific questions

  • Please log in to reply
No replies to this topic

#1 poeticjustice

poeticjustice

    Level 4

  • Members
  • Level
  • 82 points
  • 108 posts

Posted 27 February 2016 - 06:15 PM

Hoping someone has done this or knows how to do this

 

 

in the directory public_html/application/modules/Fields/View/Helper/

 

i found the php files related to the specific questions.

 

does anyone know how to make their own specific questions so they are in the drop down for add question, under specific

 

example of one is website

 

<?php
/**
 * SocialEngine
 *
 * @category   Application_Core
 * @package    Fields
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @version    $Id: FieldWebsite.php 9747 2012-07-26 02:08:08Z john $
 * @Author     John
 */
 
/**
 * @category   Application_Core
 * @package    Fields
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @Author     John
 */
class Fields_View_Helper_FieldWebsite extends Fields_View_Helper_FieldAbstract
{
  public function fieldWebsite($subject, $field, $value, $params = array())
  {
    $str = $value->value;
    if( strpos($str, 'http://') === false ) {
      $str = 'http://' . $str;
    }
 
    if (!isset($params['target'])) {
      $params['target'] = '_blank';
    }
 
    return $this->view->htmlLink($str, $str, $params);
  }
}
 
 
 
now i would like to in a way duplicate this for example, instagram.
 
reason being
facebook and twitter have specific questions, so users just put in their unique ID, not the whole like.
i know i can just add website, rename to instagram, but users would have to include the whole website address.
 
so i wish to create a instagram specific question, which will look like this
 
 
<?php
/**
 * SocialEngine
 *
 * @category   Application_Core
 * @package    Fields
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @version    $Id: FieldWebsite.php 9747 2012-07-26 02:08:08Z john $
 * @Author     John
 */
 
/**
 * @category   Application_Core
 * @package    Fields
 * @copyright  Copyright 2006-2010 Webligo Developments
 * @Author     John
 */
class Fields_View_Helper_FieldWebsite extends Fields_View_Helper_FieldAbstract
{
  public function fieldWebsite($subject, $field, $value, $params = array())
  {
    $str = $value->value;
    if( strpos($str, 'http://instagram.com/') === false ) {
      $str = 'http://instagram.com/' . $str;
    }
 
    if (!isset($params['target'])) {
      $params['target'] = '_blank';
    }
 
    return $this->view->htmlLink($str, $str, $params);
  }
}
 
even tho i for instance create this, i dont know where its controlled or linked.
Im guessing mysql. Can anyone help
 
@Les you have been great help before, any ideas matey?

 







Also tagged with one or more of these keywords: profile questions, social engine 4, profile, questions, profile question, specific questions

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


All the resources listed here are just for testing purpose and they shouldn't be used at any commercial environment without a valid license.
Those are for users who wants to try them before buy. Help the developer to build it better by purchasing them from original authors.