I am adding css in my component using this but not work

Malik Umer Farooq Posted in Component Development 7 years ago

ossnextendview('css/ossn.default', 'css/jokes');
i am adding css in my component using this but not work help me?

Replies
pk Malik Umer Farooq Replied 7 years ago

Thanks you very much sir that's work

ph Rally Homelancer Replied 7 years ago

Pull request created.

pk Malik Umer Farooq Replied 7 years ago

Thanks you sir I already local development environment for ossn and my others projects I use visual studio code , atom and notepad ++ as a text editor program
Sir where I find the `Check your github for the patch

As you say I check code nothing change also no poll request what you means check your GitHub for the patch there is no change in code sir help again ? But sorry for that I am not familiar with GitHub `

ph Rally Homelancer Replied 7 years ago

Fixed your CSS problem. Check your github for the patch.

Note:
You might want to checkout the about-user-3.1.zip, the hello-world-2-0.zip, and for a more advanced research - checkout the OssnAds component on how the Ossn functions are used.

I also recommend (if you have not already) you setup a local server probably using XAMPP for local development and research with Ossn site and components.

Also, using a utility (i'm using windows) like Windows Grep to searchfor functions or keywords on your local Ossn site helps a lot in observing how the functions are formed and used.

pk Malik Umer Farooq Replied 7 years ago

Sir not work i am upload project component on github help me
https://github.com/Lablnet/tmp
very thanks you sir

ph Rally Homelancer Replied 7 years ago

If that works, then it's fine.

If I trace your recent example, the
ossnextendview("components/Malik_jokes/plugins/default/css/jokes.php");

and according to this function ossnextendview($views, $file)
will result to an error "Too few arguments" and will later result to

$VIEW->register['components/Malik_jokes/plugins/default/css/jokes.php'][] = ''

which will be later called as

call_user_func('components/Malik_jokes/plugins/default/css/jokes.php', ossn_get_context(), $params, current_url());

whereas the

ossnextendview('css/ossn.default', 'css/jokes')

follows the correct function call and number of needed parameters and will result to

    $VIEW->register['css/ossn.default'][] = 'css/jokes'

and later be called as

ossn_plugin_view('css/jokes', $params);
pk Malik Umer Farooq Replied 7 years ago

Sir I copy this from about user component by Arslan ir so I add
This

ossnextendview('components/Malik_jokes/plugins/default/css/jokes.php');
ph Rally Homelancer Replied 7 years ago

ossnextendview('css/ossn.default', 'css/jokes')
where
'css/ossn.default' is the path of view. where the content of 'css/jokes' will be inserted into the actual runtime file at ***http://yoursite.com/css/view/ossn.default.css***

'css/jokes' is your styles file that ends in PHP. so that the actual file is found at installation/components/Malik_jokes/plugins/default/css/jokes.php